For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > May 2005 > library path problem in Makefile.am









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author library path problem in Makefile.am
niraj.kumar.ait@gmail.com

2005-05-14, 4:05 pm


I m using occi libraries .

-lclntsh -locci

which is in the following directory.I want my Makefile.am file to
search in this directory

/opt/oracle/product/9.2.0/lib/
/opt/oracle/product/9.2.0/rdbms/lib/


I m using following command in Makefile.am

INCLUDE = -I /opt/oracle/product/9.2.0/lib/ -I
/opt/oracle/product/9.2.0/rdbms/lib/

but this is not working. what else i will have to add .

TIA

Daniel Rakel

2005-05-14, 4:05 pm

niraj.kumar.ai wrote:

> I m using following command in Makefile.am
>
> INCLUDE = -I /opt/oracle/product/9.2.0/lib/ -I
> /opt/oracle/product/9.2.0/rdbms/lib/
>
> but this is not working. what else i will have to add .


An S to INCLUDE
niraj.kumar.ait@gmail.com

2005-05-14, 4:05 pm

no its not working.
This is my Makefile.am


bin_PROGRAMS=DBManager


OPTIONS = -lpthread -ldl -lclntsh -locci


FLAGS = -g -Wall


AMCXX_FLAGS=$(FLAGS)


DBManager_SOURCES= main.cpp dbManager.cpp fifoIPC.cpp semaphore.cpp
soloader.cpp
INCLUDES = -I /opt/oracle/product/9.2.0/lib/ -I
/opt/oracle/product/9.2.0/rdbms/lib/




DBManager_LDADD= $(OPTIONS)
~
~
The error msg is ::

g++ -g -O2 -o DBManager main.o dbManager.o fifoIPC.o semaphore.o
soloader.o -lpthread -ldl -lclntsh -locci
/usr/bin/ld: cannot find -lclntsh

Daniel Rakel

2005-05-14, 4:05 pm

niraj.kumar.ai wrote:

> no its not working.


I overlooked your actual problem...

> bin_PROGRAMS=DBManager
> OPTIONS = -lpthread -ldl -lclntsh -locci
> FLAGS = -g -Wall
> AMCXX_FLAGS=$(FLAGS)
>
> DBManager_SOURCES= main.cpp dbManager.cpp fifoIPC.cpp semaphore.cpp
> soloader.cpp
> INCLUDES = -I /opt/oracle/product/9.2.0/lib/ -I
> /opt/oracle/product/9.2.0/rdbms/lib/


In INCLUDES you specify pathes to search headers in using -I flag. Library
search pathes are specified with -L.

> DBManager_LDADD= $(OPTIONS)


DBManager_LDADD= -L/opt/oracle/product/9.2.0/lib/ \
-L/opt/oracle/product/9.2.0/rdbms/lib/ \
$(OPTIONS)

See also section 7.1.2 in the automake (info) manual.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com