dbTalk Databases Forums  

Linker error with fedora upgrade

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


Discuss Linker error with fedora upgrade in the mailing.database.mysql-plusplus forum.



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

Default Linker error with fedora upgrade - 08-09-2005 , 12:47 AM






Hello,

I have a problem compiling my code which worked fine till an upgrade from
fedora core 1 to fedora core 4. This is the error message that i get:

moby [6] % make
g++ -g -o test.out test.cpp weblogs.cpp -O2 -lstdc++ -I/usr/include/mysql++
-I/usr/include/mysql -L/usr/lib/mysql -L/usr/lib/libmysqlpp.a -lz
-lmysqlclient -lmysqlpp
/usr/bin/ld: warning: libmysqlclient.so.10, needed by
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so, may conflict with
libmysqlclient.so.14
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so: undefined
reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so: undefined
reference to `std::basic_ostream<char, std::char_traits<char> >::seekp(long,
std::_Ios_Seekdir)'
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so: undefined
reference to `std::basic_istream<char, std::char_traits<char> >::seekg(long,
std::_Ios_Seekdir)'
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so: undefined
reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_Rep::_S_create(unsigned int, std::allocator<char>
const&)'
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so: undefined
reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_S_empty_rep_storage'
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so: undefined
reference to `std::__default_alloc_template<true, 0>::deallocate(void*,
unsigned int)'
collect2: ld returned 1 exit status
make: *** [test.out] Error 1

i found a similar thing here in this thread (around 2 months ago):
http://lists.mysql.com/plusplus/4493

it ends by suggesting an upgrade in the binutils version (did that work
??). This is the binutils version that i have now: binutils-2.15.94.0.2.2-2.1
which seems to be fine. i am currently having mysql 4.1 (i had 3.23.58 when
it was working). i have gcc version: gcc 4.0.0.

Please let me know if i am missing something here ??

Thanks,
Aravind.



--
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
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Linker error with fedora upgrade - 08-09-2005 , 11:25 PM






aravindc wrote:
Quote:
I have a problem compiling my code which worked fine till an upgrade from
fedora core 1 to fedora core 4.
You're probably using binary RPMs not built for your specific system.
This is a problem with binaries. Download a current FC4 binary RPM, or
build one yourself from source.

Quote:
g++ -g -o test.out test.cpp weblogs.cpp -O2 -lstdc++ -I/usr/include/mysql++
-I/usr/include/mysql -L/usr/lib/mysql -L/usr/lib/libmysqlpp.a -lz
The "-L/usr/lib/libmysqlpp.a" can be "-lmysqlpp", you know. And unless
your program is licensed under the GPL or LGPL, linking statically is
probably a violation of the license.

Quote:
/usr/bin/ld: warning: libmysqlclient.so.10, needed by
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../libmysqlpp.so, may conflict with
libmysqlclient.so.14
This tells you that libmysqlpp was built against a different version of
the MySQL C API library (libmysqlclient) than is installed on your
system. As I said, you need to upgrade the binary RPM, even if you
don't actually upgrade the MySQL++ version.

Quote:
i found a similar thing here in this thread (around 2 months ago):
http://lists.mysql.com/plusplus/4493
No, that's unrelated. Dale is working on an exotic 64-bit many-CPU SGI
monstrosity, as I recall. Weird happenings are part and parcel of that
world.

--
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.