I am using eclipse CDT for a massive C++ project that has been compiling beautifully for 2 years now. I started having some weird segfaults that made no sense about 2 weeks ago and it appeared that somehow gtk had been corrupted. So since it was about time for a distro upgrade anyways I decided to upgrade from 11.04 to 12.04. Now, nothing will link. Every dependency I have throws an undefined reference error at link time. Everything compiles fine and all of the pkg-config commands are returning what they should.
Any ideas?
Here is the command:
Invoking: GCC C++ Linker g++ `pkg-config libv4l2 --libs` `pkg-config --libs alsa` -lmysqlcppconn -lboost_regex `pkg-config sigc++-2.0 --libs` `pkg-config gstreamer-0.10 --libs` `pkg-config gstreamer-app-0.10 --libs` `pkg-config gstreamer-interfaces-0.10 --libs` `pkg-config gstreamer-rtp-0.10 --libs` `pkg-config glib-2.0 --libs` `pkg-config gtk+-2.0 --libs` -lX11 -ldl -lXext `pkg-config gdkmm-2.4 --libs` `pkg-config glib-2.0 --libs` `pkg-config gtkmm-2.4 --libs` `pkg-config ptlib --libs` `pkg-config opal --libs` -fexceptions -o"HHPVideoServer" ./HHPVideoCodec.o ./engine.o ./opal/GstEndPoint.o ./opal/Linux_GstEndPoint.o ./opal/opal-call-manager.o ./logging/log.o ./gui/HHPVideoCodecGui.o ./gui/misc.o ./framework/services.o ./StreamEngine/GSTMediaStream.o ./StreamEngine/HHPStreamingEndPoint.o ./StreamEngine/HHPStreamingProtocol.o ./StreamEngine/Linux_GstMediaStream.o ./SDKEngine/AudioSettings.o ./SDKEngine/CallSettings.o ./SDKEngine/ClientSocket.o ./SDKEngine/Communications.o ./SDKEngine/DeviceInfo.o ./SDKEngine/FileActions.o ./SDKEngine/MediaCodecs.o ./SDKEngine/NetworkSettings.o ./SDKEngine/OSDSettings.o ./SDKEngine/SDKEngine.o ./SDKEngine/SDKEngineCore.o ./SDKEngine/SIPAccount.o ./SDKEngine/ServerSocket.o ./SDKEngine/SessionScheduleDisplay.o ./SDKEngine/Socket.o ./SDKEngine/VideoInput.o ./DigitalIO/DigitalIOCore.o ./DigitalIO/DigitalInputEngine.o
./HHPVideoCodec.o: In function `HHPVideoCodec':
/home/jonathan/workspace/HHPVideoServer/Debug/../HHPVideoCodec.cc:9: undefined reference to `PProcess::PProcess(char const*, char const*, unsigned short, unsigned short, PProcess::CodeStatus, unsigned short, bool)'
/home/jonathan/workspace/HHPVideoServer/Debug/../HHPVideoCodec.cc:9: undefined reference to `PTimedMutex::PTimedMutex()'
/home/jonathan/workspace/HHPVideoServer/Debug/../HHPVideoCodec.cc:9: undefined reference to `PTimedMutex::PTimedMutex()'
/home/jonathan/workspace/HHPVideoServer/Debug/../HHPVideoCodec.cc:9: undefined reference to `PTimedMutex::~PTimedMutex()'
/home/jonathan/workspace/HHPVideoServer/Debug/../HHPVideoCodec.cc:9: undefined reference to `PProcess::~PProcess()'....
It goes on for thousands of lines, with an undefined reference for every lib.
The libraries (as output by pkg-config) should be listed after the .o files. The order of arguments to the linker matters.