AMDG On 12/05/2013 01:13 PM, David Georg Reichelt wrote:
<snip>
ADD_DEFINITIONS("-std=c++0x") SET(BOOST_ROOT "C:/cppLib/boost_1_55_0/") link_libraries (${Boost_LIBRARIES})
find_package( Boost 1.54.0 COMPONENTS log)
Did you mean Boost 1.55.0?
<snip>
This code works right, but when I call make, I get the following errors:
<snip> C:/cppLib/boost_1_55_0/boost/log/detail/snprintf.hpp:45:9: Fehler: ╗::swprintf½ wurde nicht deklariert <snip>
The problem is swprintf. I'm guessing that MinGW doesn't support it. You'll probably need -DBOOST_LOG_WITHOUT_WCHAR_T.
If I don't use ADD_DEFINITIONS("-std=c++0x"), I got the following errors:
That's odd. Is Boost.Log somehow being compiled with -std=c++0x? It shouldn't be unless you specified it.
CMakeFiles\Hasselbrack.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x12c): undefined reference to `boost::log::v2s_mt_nt5::core::get()' <snip>
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
But nevertheless, boost is found and I can't figure out CMake seems to be unable to link it. The output of $(Boost_LIBRARIES) from CMake also seems correct: C:/cppLib/boost_1_55_0/stage/lib/libboost_log-mgw47-mt-1_55.dll . So I got no clue anymore what I could try.
Has anybody an hint how to solve this?
In Christ, Steven Watanabe