This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling Source Code
- To: <gcc-help at gcc dot gnu dot org>
- Subject: Re: Compiling Source Code
- From: "Martin Kalen" <martin dot kalen at todaysystems dot com dot au>
- Date: Thu, 28 Jun 2001 10:47:45 +1000
- Cc: "Derrick Rapley" <arapley at pop200 dot gsfc dot nasa dot gov>
- Organization: TODAY Systems, Inc.
- References: <01C0FEE0.AABDAAA0.arapley@pop200.gsfc.nasa.gov>
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.