Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

error loading mysql++ library: msg#00144

db.mysql.c++

Subject: error loading mysql++ library

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 += -I/usr/include/mysql

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

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

# path for mySQL++ library
LDFLAGS += -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!


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation