dbTalk Databases Forums  

error loading mysql++ library

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss error loading mysql++ library in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stephen Povilaitis
 
Posts: n/a

Default error loading mysql++ library - 08-30-2005 , 03:38 PM






------_=_NextPart_001_01C5ADA2.AE1C1029
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I'm trying to link the mysql++ library with a simple program and am =
having some trouble. The examples compile and run fine, so I hope it's =
something simple I've overlooked.

I'm using gcc and in my makefile I have the following lines to include =
the appropriate mysql and mysql++ header files and libraries:

# path for mySQL header files
CCFLAGS +=3D -I/usr/include/mysql

# path for mySQL++ header files
CCFLAGS +=3D -I/usr/local/include/mysql++

# path for mySQL client library
LDFLAGS +=3D -L/usr/lib/mysql -lmysqlclient

# path for mySQL++ library
LDFLAGS +=3D -L/usr/local/lib -lmysqlpp

my program seems to compile and link fine. Here is part of the make =
output:

--- Linking /home/xanadu/test/bin/testProgram
/usr/bin/g++ /home/xanadu/test/src/testProgram.cc -L/usr/lib/mysql =
-lmysqlclient -L/usr/local/lib -lmysqlpp -lnsl -lm -o =
/home/xanadu/test/bin/testProgram

Yet when I attempt to run the program, it appears unable to find the =
mysql++ library and gives this error:

error while loading shared libraries: libmysqlpp.so.0: cannot open =
shared object file: No such file or directory

Yet the libraries appear to be in /usr/local/lib where I told make they =
would be. Here's my listing of the usr/local/lib directory:

[xanadu@xanadu src]$ ls -l /usr/local/lib
total 1540
-rwxr-xr-x 1 root root 834 Aug 25 12:38 libmysqlpp.la
lrwxrwxrwx 1 root root 19 Aug 25 12:38 libmysqlpp.so -> =
libmysqlpp.so.0.2.0
lrwxrwxrwx 1 root root 19 Aug 25 12:38 libmysqlpp.so.0 -> =
libmysqlpp.so.0.2.0
-rwxr-xr-x 1 root root 1551825 Aug 25 12:38 libmysqlpp.so.0.2.0

What have I missed?

thanks again for your help!



------_=_NextPart_001_01C5ADA2.AE1C1029--

Reply With Quote
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: error loading mysql++ library - 08-30-2005 , 05:13 PM






On Tue, Aug 30, 2005 at 03:37:46PM -0500, Stephen Povilaitis wrote:
Quote:
Yet the libraries appear to be in /usr/local/lib where I told make
they would be. Here's my listing of the usr/local/lib directory:
Is /usr/local/lib in /etc/ld.so.conf? Did you run ldconfig after
installing mysql++?

Just taking a wild guess here, since it's not clear what system you're
running on, and use of /usr/local suggests you installed manually.

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: error loading mysql++ library - 08-30-2005 , 07:40 PM



Stephen Povilaitis wrote:
Quote:
error while loading shared libraries: libmysqlpp.so.0:
Please upgrade to 2.0.4. There was an error in the automake setup in
2.0.1 and 2.0.2 that lead to these bogus library sonames.

Aside from that, I think Chris' suggestion is probably correct.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Steve Povilaitis
 
Posts: n/a

Default RE: error loading mysql++ library - 08-31-2005 , 02:22 PM




Quote:
-----Original Message-----
From: Warren Young [mailto:mysqlpp (AT) etr-usa (DOT) com]
Stephen Povilaitis wrote:

error while loading shared libraries: libmysqlpp.so.0:

Please upgrade to 2.0.4. There was an error in the automake setup in
2.0.1 and 2.0.2 that lead to these bogus library sonames.

Aside from that, I think Chris' suggestion is probably correct.
I upgraded to 2.0.4 and ran ldconf and everything is good now.

Thanks to both of you!


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.