Boost logo

Boost Users :

From: John Gardner (huxoll_at_[hidden])
Date: 2006-02-14 14:01:16


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_at_program_options_at_boost@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@ABV?$basic_string_at_GU?$char_traits_at_G@std@@V?$allocator_at_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


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