Boost logo

Boost :

Subject: [boost] [Locale] Boost.Locale cannot Run in Visual Studio 2010
From: Sarvagya Pant (sarvagya.pant_at_[hidden])
Date: 2015-03-26 04:52:01

 I have been trying to learn Boost.Locale Module. Consider this
example. The code gets successfully compiled but when I try to run it, it
gives the error

Unhandled exception at 0x74d34b32 in LearningCPP.exe: Microsoft C++
exception: std::bad_cast at memory location 0x00a6fa48..

I have attached the stack-trace of the program also. Here it is:

    [Frames below may be incorrect and/or missing, no symbols loaded
for KernelBase.dll]
    KernelBase.dll!74d34b32() >
msvcr100d.dll!_nh_malloc_dbg(unsigned int nSize, int nhFlag, int
nBlockUse, const char * szFileName, int nLine) Line 302 + 0x1d bytes
    msvcr100d.dll!malloc(unsigned int nSize) Line 56 + 0x15 bytes C++
>(const std::locale & _Loc) Line 526 C++
    LearningCPP.exe!boost::locale::to_upper<char>(const char * str,
const std::locale & loc) Line 225 + 0x9 bytes C++
    LearningCPP.exe!main() Line 170 + 0xc4 bytes C++
    LearningCPP.exe!__tmainCRTStartup() Line 555 + 0x19 bytes C
    LearningCPP.exe!mainCRTStartup() Line 371 C

Did anyone faced this issue when using Boost.Locale in Visual Studio 2010?
If so, how do I resolve this issue?

*PS:* I have used option Use Unicode Character Set under the Character Set
option of Visual Studio. I believe the libraries are correctly linked too.


Boost list run by bdawes at, gregod at, cpdaniel at, john at