List:MySQL++« Previous MessageNext Message »
From:chandra shekar Date:April 23 2005 6:18pm
Subject:Re: Not able to connect to Mysql now
View as plain text  
Hi 

I tried using the -L switch but it is giving error as
shown below.

 g++ -I/usr/local/include -I/usr/local/mysql/include
-L/usr/local/lib -o util util.cpp -lmysqlpp
-lmysqlclient


ERRORS:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18):
In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to
`main'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_getspecific'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_key_delete'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_mutexattr_destroy'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_mutexattr_setkind_np'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_key_create'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_mutexattr_init'
/usr/local/lib/libmysqlpp.so: undefined reference to
`pthread_setspecific'
collect2: ld returned 1 exit status

I also used the option -L/usr/local/mysql/lib but for
the same error.

I have set LD_LIBRARY_PATH to /usr/local/lib in
.bash_profile.
I have updated /etc/ld.so.conf with above paths and
ran ldconfig.

The .o files under /examples are working fine, but I
am not able to compile seperatly. 
I reconfigured mysql++ and repeated above steps but
for no use. 

Please help..!!!

Thanx
shekar.


--- Warren Young <mysqlpp@stripped> wrote:

> chandra shekar wrote:
> 
> > usr/bin/ld: cannot find -lmysqlclient
> 
> That's the MySQL C API library.  It is either not
> installed in a 
> directory that ld can find on its own, or it is not
> installed at all. 
> If the former, use the -L compiler switch to tell it
> where the library 
> is at.
> 
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:   
>
http://lists.mysql.com/plusplus?unsub=1
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Thread
Re: Not able to install the rpm - not able to connect to Mysql nowchandra shekar18 Apr
  • Re: Not able to install the rpm - not able to connect to Mysql nowWarren Young18 Apr
    • Re: Not able to connect to Mysql nowchandra shekar21 Apr
      • Re: Not able to connect to Mysql nowWarren Young21 Apr
        • Re: Not able to connect to Mysql nowchandra shekar23 Apr
          • Re: Not able to connect to Mysql nowChris Frey23 Apr
            • Re: Not able to connect to Mysql nowWarren Young25 Apr
            • Re: Not able to connect to Mysql nowchandra shekar25 Apr