a newbie question -how to set my own lib and include path

a newbie question -how to set my own lib and include path

Post by Johnson Cha » Sat, 26 Feb 2000 04:00:00



Hello,

I have my own include files and my own lib files which I want to
include inside my project, they are not in the /usr/ucblib directory .
I just want to know how to set the environment to let the compiler and
linker to know my include and lib path.

thanks

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

a newbie question -how to set my own lib and include path

Post by gl.. » Sun, 27 Feb 2000 04:00:00




Quote:>Hello,

>I have my own include files and my own lib files which I want to
>include inside my project, they are not in the /usr/ucblib directory .
>I just want to know how to set the environment to let the compiler and
>linker to know my include and lib path.

>thanks

>Sent via Deja.com http://www.deja.com/
>Before you buy.

If you are using cc or c++ from the command line:

cc -o somefile somefile.c -L<path_to_your_libs> -I<path_to_indludes>

in make

(liberally cut short)

LIBS = -L<path_to_your_libs> -L<path_to_your_libs>
INCLUDES = -I<path_to_indludes> -I<path_to_indludes>
OBJ = somefile.o

.c.o:
        ${CC} ${LIBS} ${INCLUDES} $*.c

somefile                :       ${OBJ}