On Oct 26, 2009, at 16:25 , Thijs Koerselman wrote:

Hi, 

Somehow I keep getting exceptions related to the use of strings when I compile my program in Xcode. If I use strings in my program arguments I get an bad_any_cast exception from the store() method.

PS: I'm using OS10.6.1 and Xcode 3.2.1

I have been bitten by the following item in XCode 3.2.1 release notes:

  • The default gcc 4.2 compiler is not compatible with the Standard C++ Library Debug Mode. C++ programs compiled with Xcode 3.2 may not work in the Debug configuration. To fix this, set the Compiler Version to 4.0, or edit the Debug configuration’s Preprocessor Macros and remove the entries:

    _GLIBCXX_DEBUG=1 _GLIBCXX_DEBUG_PEDANTIC=1


I would say the likelihood this is happening to you is rather high.

Please note that another possible workaround, beside the ones listed above, is to set the base SDK to 10.5

Regards,

Jean-Denis