This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Compiling Source Code


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]