Boost.PropertyTree.put linking error



I'm getting this weird linking error that makes no sense at all. My boost libs were compiled as static libraries with a dynamic runtime. (link=static, runtime-link=shared)


Take the following code:



#include <boost/property_tree/xml_parser.hpp>

int main()
{
boost::property_tree::ptree config;
boost::property_tree::read_xml("test.xml", config);

config.put("test.value", 1.0f);

return 0;
}


This will not link and produces the following ambiguous error:



Error 11 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (__imp_??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z) <object name>


I'm using Visual Studio 2013 express and Boost 1.56, I've searched all over the internet and can't find any information on this. #including < string > or < sstream > was a thought that occurred to me since the error was referencing basic_ostringstream however that did not work since it's trying to import it from a dll.


Any help would be appreciated as this is driving me nuts.


No comments:

Post a Comment