/usr/bin/ld cannot locate libmysqlclient, when it is there
- From: "saurabh" <saurabh.dubey1@xxxxxxxxx>
- Date: 31 Mar 2006 05:03:07 -0800
Hi all,
I am working on a c++ application, porting it from solaris 8 to linux
9, using gcc version 3.4.3 20050227.
I am getting error of;
---------------------------------
c++ -g ----followed by other .o files ----- -lmysqlclient -o
.../../myapp
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [../../myapp] Error 1
--------------------------------
I am using a makefile to compile and build the application... some of
the makefile details (relevant) are as below;
----------------------------------
SRCPATH = ..
FORMATSRCPATH = ../../../myapp1/src
MYSQLPATH = ../../../../thirdparty/mysql
MYSQLLIBS = $(MYSQLPATH)/lib/mysql
VPATH = $(SRCPATH):$(FORMATSRCPATH):$(MYSQLLIBS)
CC = c++
CFLAGS = -g
CPPFLAGS = $(DEFS) $(PATHS)
PATHS = \
-I$(SRCPATH) \
-I$(FORMATSRCPATH) \
-I$(MYSQLPATH)/include/mysql
$(TARGETNAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -lmysqlclient -o $(TARGETNAME)
-------------------------------------------
If i append the "-lmysqlclient" with "-L$(MYSQLLIBS)" it builds fine,
but i am not getting why it is not being picked up from the VPATH.
All other directory paths are being picked up from VPATH(i've verified
that), as commenting VPATH or changing it gives complication error.
Please help!!!!
Regards,
Saurabh
.
- Follow-Ups:
- Re: /usr/bin/ld cannot locate libmysqlclient, when it is there
- From: "Nils O. Selåsdal"
- Re: /usr/bin/ld cannot locate libmysqlclient, when it is there
- From: Carlos Moreno
- Re: /usr/bin/ld cannot locate libmysqlclient, when it is there
- Prev by Date: Re: Memory fault when i am using a shared object
- Next by Date: Re: /usr/bin/ld cannot locate libmysqlclient, when it is there
- Previous by thread: CK-ERP (Open Source ERP/CRM Software) v.0.18.1 released
- Next by thread: Re: /usr/bin/ld cannot locate libmysqlclient, when it is there
- Index(es):