Re: XForms: compiler fdesigner generated files

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 22 Aug 97 06:07:04 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I have been using "c" for a short period of time and I have run into
> some trouble with compiling the files that are generated from the
> fdesigner. After the files are generated I create a "main file". When I
> try to compile that I get the error "undefined refrence to
> create_form_xxx" were xxx is the name of the structure that holds the
> form properties. Can some one point me to a tutorial on compiling
> fdesigner generated files or tell me how to compile it with out getting
> this error. An example would be nice.

I don't know that there is a tutorial at that level, which is,
frankly, pretty elementary.

You have to also compile and include in the link step the .c file
created by fdesign. For instance, if your .fd file (the description
file produced by fdesign) is named `foo.fd' and you take the default
option to create the .c and .h files when you save, you'll have, as a
reward for your efforts, the files `foo.c' and `foo.h'. Assuming that
your main is contained in `foo_main.c' and that there are no other
files necessary to build your application, you would do

cc -c foo.c
cc -c foo_main.c
cc -o foo foo_main.o foo.o -lforms -lX11 -lm

(where cc is your favorite C compiler) and you're off to the races.
Obviously, if you have more files that make up your program, you'll
have more compile steps. You may also need to provide other compiler
and linker flags if you're doing something special or your libraries
are in non-standard places.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/