program options, link error on wide char support

I'm having a problem with the wchar_t functions on windows with VS .Net 2003. I compiled with bjam "-sTOOLS=vc-7_1" -sBOOST_LIB_DIAGNOSTIC --without-python install In a program with a _tmain (wchar_t argv), I have: #ifdef BOOST_NO_STD_WSTRING cout << "No standard wstring! " << BOOST_NO_STD_WSTRING << endl; #endif cout << "Stdlib version: " << BOOST_STDLIB << endl; wstring wstr = L"abc"; string str = "abc"; str = boost::program_options::to_internal(wstr); I get: error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl boost::program_options::to_internal(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (?to_internal@program_options@boost@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@4@@Z) referenced in function _main However, if I call to_internal() with 'str' instead of 'wstr', it links fine, and the output is: Stdlib version: Dinkumware standard library version 313 abc I have similar problems with other functions, but I've narrowed it down to a single function here. Is there anything special that needs to happen for wchar_t functions in program_options? TIA, John Huxoll Gardner
participants (1)
-
John Gardner