Compiling Source Code

Martin Kalen martin.kalen@todaysystems.com.au
Wed Jun 27 17:47:00 GMT 2001


From: "Derrick Rapley" <arapley@pop200.gsfc.nasa.gov>
> -> $ gcc -c rep_CostAdjustment.c
> rep_CostAdjustment.c:152: sqlca.h: No such file or directory
> rep_CostAdjustment.c:160: dbfunc.h: No such file or directory
> rep_CostAdjustment.c:161: util.h: No such file or directory
> rep_CostAdjustment.c:162: pdfutil.h: No such file or directory

Use the -I (for "search include directories") flag to tell gcc where
you have your external header files. E.g:
# gcc -I /usr/oracle/headers -I~rapley/include -c rep_CostAdjustment.c

If you also want to link with external libraries you need the -L flag
in a similar fashion and -l[libname] for each library. E.g:
# gcc -L/usr/oracle/libs -lclntsh -o myapp rep_CostAdjustment.o foo.o
bar.o

See the man-page for gcc for more info about these flags.

Regards,
 Martin.



More information about the Gcc-help mailing list