[Log4cplus-devel] [ log4cplus-Support Requests-3563229 ] Compiling with C++11 support
Logging Framework for C++
Brought to you by:
wilx
From: SourceForge.net <no...@so...> - 2012-08-31 07:53:21
|
Support Requests item #3563229, was opened at 2012-08-30 03:15 Message generated for change (Comment added) made by wilx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429074&aid=3563229&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v1.1.0 Status: Open Priority: 5 Private: No Submitted By: gorpknalp (gorpknalp) Assigned to: Václav Zeman (wilx) Summary: Compiling with C++11 support Initial Comment: Hi, I was trying to compile a program against log4cplus 1.1.0-rc8 on a new system (for the record, a Raspberry Pi), and had this error message: Linking CXX executable cachip CMakeFiles/cachip.dir/ServeClient.cpp.o: In function `ServeClient': /home/pi/prog/cachip/cachip/ServeClient.cpp:40: undefined reference to `log4cplus::Logger::operator=(log4cplus::Logger&&)' collect2: ld returned 1 exit status This happens because I compiled log4cplus with CMake and no special CXXFLAG, while on the other hand my own program is compiled with -std=c++0x (on GCC 4.6). I'm not sure whether it is a bug or not as I'm not a package maintainer. I guess the library should be compiled unconditionally with C++11 support when the platform's compiler supports it. ---------------------------------------------------------------------- >Comment By: Václav Zeman (wilx) Date: 2012-08-31 00:53 Message: If I understand conclusions in some of GCC mailing list threads correctly, binaries compiled for C++11 and C++03 will stay incompatible. IIRC there is no way to really make them compatible. But I could be wrong. We will have to wait and see what the GCC and other compilers' devs come up with. ---------------------------------------------------------------------- Comment By: gorpknalp (gorpknalp) Date: 2012-08-31 00:39 Message: Out of curiosity, do you know of any official resource stating whether C++03 and C++11 ABIs are supposed to be compatible or not? I can see some discussions about GCC's incompatibilities but it's not very clear whether it should be fixed in later versions or if separate libraries should be built to support C++11. I'm surprised there's not been any outcry from Linux distributions yet. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-08-30 07:31 Message: Applications and libraries compiled for different languages (in this case C++03 and C++11) are not binary compatible (at least not with GCC). This is true for all libraries in general, not just for log4cplus. You have to choose the language and specify it that for both log4cplus' compilation and your application's compilation. To do that for log4cplus just add -std=c++0x to CXXFLAGS on log4cplus' configure script command line. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429074&aid=3563229&group_id=40830 |