Re: XForms: compiling errors

Robert S. Mallozzi (mallors@crazyhorse.msfc.nasa.gov)
Sat, 23 Aug 1997 15:49:17 -0500 (CDT)

To subscribers of the xforms list from "Robert S. Mallozzi" <mallors@crazyhorse.msfc.nasa.gov> :

On 23 Aug, Chris S Bullock wrote:
> I have been making a shell program that will help me compile programs
> that use the xforms library. Everytime I try to compile the program
> though it gives me an error that follows:
>
> In function main
> undefined reference to 'create_form_interval
>
> When I compile the program by typing the commands in manually, it
> compiles ok. Can anyone help. I have attached two files. one the shell
> and the other are the files that make up the interval program. Thanks in
> advance for any help.
> Chris S Bullock

I did not look at your c source code, but why are you writing shell
scripts to compile and not using "make"? It was designed just for this
purpose: to make compiling code easier. Also, in your shell script, the
call to gcc is

gcc -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lm -lforms -i $first $second -o $store

Two things about this:

1. Although I do not think it matters in this case, you should be
in the habit of specifying higher level libs on the left, for
example, -lforms -lX11 -lm This order will make a difference
if you ever try to compile a statically linked executable.

2. What is the -i flag doing there? You do not need that - is it
even a valid option for gcc - I do not see it offhand in the man
page...

-bob

-- 
Dr. Robert S. Mallozzi
University of Alabama in Huntsville
http://cspar.uah.edu/~mallozzir/

_________________________________________________ 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/