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