Re: /usr/bin/ld: cannot find -lmysqlcppconn

  • From:
  • To:
  • Subject: Re: /usr/bin/ld: cannot find -lmysqlcppconn
  • Date: Fri, 14 Dec 2012 10:14:13 +0100 (CET)


----- Original Message -----
> paulf wrote:
> > ----- Original Message -----
> > > New in c++ and im trying to connect to mysql database did in java
> > > works fine.when to do it in c++ project followed all the
> > > instruction
> > > from http://planet.mysql.com/entry?id=18341;but it gives me this
> > > error.
> > > 
> > > g++ -o dist/Debug/GNU-Linux-x86/cppapplication_2
> > > build/Debug/GNU-Linux-x86/main.o -L/usr/local/lib
> > > -L/usr/local/include/mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit
> > > -lmysqlcppconn -lmysqlcppconn-static -lmysql -lmysqlclient
> > > /usr/bin/ld: cannot find -lmysqlcppconn
> > > /usr/bin/ld: cannot find -lmysqlcppconn-static
> > > /usr/bin/ld: cannot find -lmysql
> > > /usr/bin/ld: cannot find -lmysqlclient
> > 
> > Do you understand what the link editor is trying to do?
> > 
> > Are the libraries (specified with the -l option) to be found either
> > in library search paths (specified by -L) or the system
> > directories (like /usr/lib)?
> 
> 1. to link the project with the library file

Not just that. Really it is all about symbol resolution.

> 2. And the second question i cnt answer all i know is my libraries
> are in /usr/lib

On an old RedHat machine, they are in /usr/lib/mysql (at least, some of them).

Does "-L/usr/lib/sql -l<required SQL libs>" work?

A+
Paul


/usr/bin/ld: cannot find -lmysqlcppconn

12/12/2012

Re: /usr/bin/ld: cannot find -lmysqlcppconn

paulf 12/12/2012

Re: /usr/bin/ld: cannot find -lmysqlcppconn

Paulo Panhoto 12/12/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/13/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/13/2012

Re: /usr/bin/ld: cannot find -lmysqlcppconn

Paulo Panhoto 12/13/2012

Re: /usr/bin/ld: cannot find -lmysqlcppconn

paulf 12/14/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/14/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/14/2012

Re: /usr/bin/ld: cannot find -lmysqlcppconn

Paulo Panhoto 12/14/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/14/2012

Re: /usr/bin/ld: cannot find -lmysqlcppconn

Paulo Panhoto 12/14/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/18/2012

/usr/bin/ld: cannot find -lmysqlcppconn

12/20/2012

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 187 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close