Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem with linking files using boost::log with CMake Buildfile
From: David Georg Reichelt (davidgeorg_reichelt_at_[hidden])
Date: 2013-12-10 09:16:45


Am 08.12.2013 12:29, schrieb Bjorn Reese:
> On 12/07/2013 08:40 PM, David Georg Reichelt wrote:
>
>> CMakeFiles\Hasselbrack.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x285):
>>
>> undefined reference to `std::ios_base::Init::~Init()'
>
> This indicates that you use the C compiler to link a C++ program.
>
> In your CMakeLists.txt you explicitly set CMAKE_CXX_COMPILER to gcc,
> not to g++. In fact, I would not set the compiler variables explicitly
> as they are auto-detected.
Thanks, setting the compiler to g++ solved the problem! Now it compiles
as normal.
>
> It may also be a good idea to tell CMake that you are working on a C++
> project:
>
> project(TV6 C++)
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net