I'm running ubuntu (12.04) desktop for development and server for deployment. I'm using static libraries and I've got log4cplus installed on both sides. I didn't modify the install scrippt on either, just "sudo make install".
When I run my app on the server using the library built there I get this error (via stderr, not in the log):
./eventlistener: symbol lookup error: ./eventlistener: undefined symbol: _ZN9log4cplus6LoggeraSEOS0_
But if I copy the liblog4cplus.so from my dev machine (unlinking, so I have the actual file) it works. It also works on my dev machine.
(also, where should I look for support. I asked on StackOverflow since there are some other questions and wiix answered one), but haven't had a response -> http://stackoverflow.com/questions/19849731/log4cplus-how-do-i-change-the-log-file-name-at-runtime)
Thanks
Ӎσᶎ
The
_ZN9log4cplus6LoggeraSEOS0_symbol demangles tolog4cplus::Logger::operator=(log4cplus::Logger&&). I think that somehow log4cplus has been compiled without C++11 support support/switches and your application is compiled with C++11 support/switches. Make sure you are consistent with this.doing "export CXXFLAGS=-std=c++11" then uninstalling and re-making worked, so you're right. I thought log4cplus required C++11 so this wouldn't be an issue.
I think it would be worth adding that to the default makefile, just so people like me with a default g++ install don't have this problem.
thanks for the fast solution
Ӎσᶎ
Last edit: Digi 2013-11-19
Adding the switch by default would break builds for other people. This issue is covered in
README: