boost unit test framework exports std::basic_ostringstream
The boost unit test framework exports std::basic_ostringstream to the dll. This causes linker errors on visual studio 2012 (LNK 2005), if the tested code contains std::basic_ostringstream. You can confirm the symbol std::basic_ostringstream is in boost_unit_test_framework-vc110-mt-1_61.dll by using dependency walker. I have the same problem with my self-built dlls as well as the ones downloaded from https://sourceforge.net/projects/boost/files/boost-binaries/. Is this a problem with boost or did I configure the build wrong? Thank you. I posted the issue on Stack Overflow a week ago [1]. Please excuse, if this still counts as cross posting. Regards Sascha [1] http://stackoverflow.com/questions/37922117/stdbasic-ostringstream-exported-...
Sascha Kremers
The boost unit test framework exports std::basic_ostringstream to the dll. This causes linker errors on visual studio 2012 (LNK 2005), if the tested code contains std::basic_ostringstream.
You can confirm the symbol std::basic_ostringstream is in boost_unit_test_framework-vc110-mt-1_61.dll by using dependency walker.
I have the same problem with my self-built dlls as well as the ones downloaded from https://sourceforge.net/projects/boost/files/boost-binaries/.
Is this a problem with boost or did I configure the build wrong?
I suspect the problem is rooted in the fact that you are mixing two different VC++ runtimes. some.lib Is static library built against static runtime while Boost.Test DLL is built against shared one. Gennadiy
Am 29.06.2016 um 18:28 schrieb Gennadiy Rozental:
Sascha Kremers
writes: The boost unit test framework exports std::basic_ostringstream to the dll. This causes linker errors on visual studio 2012 (LNK 2005), if the tested code contains std::basic_ostringstream.
You can confirm the symbol std::basic_ostringstream is in boost_unit_test_framework-vc110-mt-1_61.dll by using dependency walker.
I have the same problem with my self-built dlls as well as the ones downloaded from https://sourceforge.net/projects/boost/files/boost-binaries/.
Is this a problem with boost or did I configure the build wrong? I suspect the problem is rooted in the fact that you are mixing two different VC++ runtimes. some.lib Is static library built against static runtime while Boost.Test DLL is built against shared one.
Gennadiy I built the some_test.exe, some.exe and some.lib with /MD (Multi-Threaded DLL). I built the boost libs with runtime-link=shared. All are built and linked by VC11 (Visual Studio 2012).
dumpbin /symbols on some.lib
marks the problematic symbols as external. So I don't think they use the
runtime dynamically.
Do you think, it is okay for the boost_unit_test dll to export the
following functions?
??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@$$QEAV01@@Z
std::basic_ostringstream
participants (2)
-
Gennadiy Rozental
-
Sascha Kremers