dbTalk Databases Forums  

Linking error after libstdc++ update

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


Discuss Linking error after libstdc++ update in the mailing.database.mysql-plusplus forum.



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

Default Linking error after libstdc++ update - 09-24-2005 , 07:35 AM






Hi,

I recently updated KDE to 3.4.2, which also updated libstdc++ to
libstdc++6. After this update I tried to compile a project that has
compiled without problems before and got a bunch of undefined
references (see below). I recompiled mysql++ and updated binutils but
that had no effect.

Any ideas what could've caused this? I'm using g++ 4.0.2 on Debian.

-----
/usr/lib/libmysqlpp.so: undefined reference to
`std::__default_alloc_template<true, 0>::allocate(unsigned int)'
/usr/lib/libmysqlpp.so: undefined reference to
`std::basic_ostream<char, std::char_traits<char> >::seekp(long,
std::_Ios_Seekdir)'
/usr/lib/libmysqlpp.so: undefined reference to
`std::basic_streambuf<char, std::char_traits<char>
Quote:
::_M_out_cur_move(long)'
/usr/lib/libmysqlpp.so: undefined reference to
`std::basic_istream<char, std::char_traits<char> >::seekg(long,
std::_Ios_Seekdir)'
/usr/lib/libmysqlpp.so: undefined reference to
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
Quote:
::_Rep::_S_create(unsigned int, std::allocator<char> const&)'
/usr/lib/libmysqlpp.so: undefined reference to
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
Quote:
::_S_empty_rep_storage'
/usr/lib/libmysqlpp.so: undefined reference to
`std::__default_alloc_template<true, 0>::deallocate(void*, unsigned
int)'
collect2: ld returned 1 exit status
-----

- Ville

--
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   
Chris Frey
 
Posts: n/a

Default Re: Linking error after libstdc++ update - 09-24-2005 , 05:26 PM






On Sat, Sep 24, 2005 at 03:34:54PM +0300, Ville Matilainen wrote:
Quote:
Hi,

I recently updated KDE to 3.4.2, which also updated libstdc++ to
libstdc++6. After this update I tried to compile a project that has
compiled without problems before and got a bunch of undefined
references (see below). I recompiled mysql++ and updated binutils but
that had no effect.

Any ideas what could've caused this? I'm using g++ 4.0.2 on Debian.
Is g++ 4.0.x the only compiler on your system? If not, did you compile
mysql++ with the right one?

Did you compile mysql++ yourself? Or did you use the unstable package?
Is the version in /usr/lib the one you expect?

I'd double check your recompile of mysql++, since some assumption is probably
incorrect in that toolchain usage.

Also, double check your project build. Do you have multiple versions
of mysql++ installed? Perhaps one in /usr/local?

Just some questions off the top of my head. I'm successfully compiling
mysql++ here with g++ 4.0.1, so it's likely just a bug in your build
process for mysql++ or your project.

- 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   
Erwin
 
Posts: n/a

Default Re: Linking error after libstdc++ update - 09-24-2005 , 05:39 PM



Ville,

Quote:
I recently updated KDE to 3.4.2, which also updated libstdc++ to
libstdc++6. After this update I tried to compile a project that has
compiled without problems before and got a bunch of undefined
references (see below). I recompiled mysql++ and updated binutils but
that had no effect.
I don't know if the update binutils are necessary. I've experienced the
same problems you have (with various other C++ libs as well), and the
problems disappeared when you recompiled the library. G++ 4.* seems to
have broken the C++ ABI (again), which is the basic cause of this.

Quote:
Any ideas what could've caused this? I'm using g++ 4.0.2 on Debian.
Try to go back (Virtually impossible without just reinstalling and not
using testing or unstable), or when that's no option make meticulously
(sp?) sure that you've recompiled each and every c++ lib you're using
and that you're also linking with that lib.

I hope you get your app working,
Erwin
--
erwin (AT) leastwanted (DOT) nl
I pledge allegiance to the form of science fiction and fantasy and to
the promise for which it stands: one world, polycultural, genetically
engineered, with Internet access for all. -- Tonio Roque

--
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   
Ville Matilainen
 
Posts: n/a

Default Re: Linking error after libstdc++ update - 09-26-2005 , 11:18 AM



Well I got my project compiled, after I recompiled mysql++ using
g++-3.4. But now when I try to execute my app it says it can't find
the mysqlpp library! The examples that came with mysql++ work, but my
project doesn't. This isn't a mysql++ related problem anymore, so I
won't bother you with it.

Thank you for your help!

- Ville

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

Default Re: Linking error after libstdc++ update - 09-26-2005 , 12:26 PM



Ville Matilainen wrote:
Quote:
it says it can't find the mysqlpp library!
You probably installed it in a directory your dynamic linker cannot
find. On Linux, for instance, you may have to edit /etc/ld.so.conf and
re-run ldconfig to get it working.

--
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
  #6  
Old   
Chris Frey
 
Posts: n/a

Default Re: Linking error after libstdc++ update - 09-26-2005 , 12:57 PM



On Mon, Sep 26, 2005 at 11:26:24AM -0600, Warren Young wrote:
Quote:
Ville Matilainen wrote:
it says it can't find the mysqlpp library!

You probably installed it in a directory your dynamic linker cannot
find. On Linux, for instance, you may have to edit /etc/ld.so.conf and
re-run ldconfig to get it working.
Or if it's a really temporary path, set LD_LIBRARY_PATH.

- 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
  #7  
Old   
Ville Matilainen
 
Posts: n/a

Default Re: Linking error after libstdc++ update - 09-27-2005 , 06:08 AM



You are correct. I got it working yesterday. I edited the file you
mentioned and also modified LD_LIBRARY_PATH and LD_RUN_PATH.

Warren Young wrote:

Quote:
You probably installed it in a directory your dynamic linker cannot find.=
On Linux, for
instance, you may have to edit /etc/ld.so.conf and re-run ldconfig to get=
it working.

- Ville

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