[SOLVED] Ubuntu 11.10 upgrade + upgrade Galileo to Eclipse Indigo - now linking fails [message #843947] |
Fri, 13 April 2012 14:29 |
Gerhard Smith Messages: 2 Registered: April 2012 |
Junior Member |
|
|
I had Ubuntu 10.10 running with Galileo and mysql 5.5 and the project compiled fine.
I then upgraded to Ubuntu 11.10, which included an upgrade to Galileo.
I found the projects in their workspaces, but the mysql projects keep failing with "undefined reference to get_driver_instance".
I downloaded mysql source and compiled and installed and ran the tests and it works.
I downloaded the C++ connector source, compliled and installed.
I set the "Libaray Search Path" in Eclipse (I even copied the libmysqlcppconn.so etc to /usr/lib).
I included mysqlcppconn in the Libraries under tool settings.
When I compile I still get "Undefined reference to get_driver_instance". I also tried to compile from a terminal window using the text from the Eclipse console window, but still the same problem.
Here is the console linker line:
g++ -L/usr/local/lib -o"CImageFrame" ./CImageFrame.o
/usr/local/lib/libmysqlcppconn-static.a -lMagick++ -lmysqlcppconn
I have tried with and without the static library.
Any suggestions will be greatly appreciated.
[Updated on: Fri, 13 April 2012 20:58] Report message to a moderator
|
|
|
|
Re: Ubuntu 11.10 upgrade + upgrade Galileo to Eclipse Indigo - now linking fails [message #844231 is a reply to message #844152] |
Fri, 13 April 2012 20:53 |
Gerhard Smith Messages: 2 Registered: April 2012 |
Junior Member |
|
|
I did EXTENSIVE googling but eventually got the amswer from a request on the Ubuntu forum.
It was always clearly a linking problem, it was why and how to fix it. The libraries being used are the correct ones and were built from source to ensure compatibility.
t1497f35 replied there:
11.10 did the ( http-s://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition) toolchain transition and people reporting about undefined stuff while compiling are usually those unaware of this transition and hence affected by this. Make sure you're only doing only direct linking and other stuff as specified above.
So it turns out it was a problem created by the new tool chains, they being much less forgiving of library sequences and also about EXPLICITLY inclduing all required libraries.
IT MIGHT BE WORTH IT FOR A MODERATOR TO MAKE A STICKY ABOUT THIS AS IT WILL CATCH MANY DEBIAN/UBUNTU USERS WHEN THEY UPGRADE.
[Updated on: Fri, 13 April 2012 21:04] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03742 seconds