MySQL undefined references
Bug #877458 reported by
David Doucette
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.1 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I just upgraded from 11.04 to 11.10. I use a shell script to compile and make CGIs that looks like this:
g++ $(mysql_config --cflags) $(mysql_config --libs) $1.cpp
chmod 755 a.out
mv a.out /home/lts/
This has been working for years, and now throws "undefined reference" errors to every MySQL function I use. I used Synaptic (after I had to download it!) to remove MySqL server, client, libraries, etc. in case the upgrade got messed up, but it doesn't help.
I have a development project that's now dead in the water. I have a second PC and plan to put either 11.4 or the LTS version on it, but I'm hoping I can get 11.10 running before it comes to this.
Thank you.
To post a comment you must log in.
This is due to a toolchain change in oneiric. /wiki.ubuntu. com/NattyNarwha l/ToolchainTran sition
Now by default the linker flag --as-needed is used, which requires you to place the libraries behind objects needing their symbols.
See: https:/
A fix should be to simply do this:
g++ $(mysql_config --cflags) $1.cpp $(mysql_config --libs)