Boost logo

Boost Users :

Subject: [Boost-users] Please help with rebuild on Windows
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-05-11 18:49:56


I want to use the program-options library, and the copy of boost used by this application suite is 1.38. Using Visual Studio 2008, debug build, the resulting program crashes in the variables_map constructor.

My assumption is that the compiler options don't match: in particular, a stupid thing called
          _HAS_ITERATOR_DEBUGGING=0
is infectious as it causes the STL to generate different code and different sized objects.

The layout of the boost files doesn't match the documentation, in that bjam.exe is in a subdirectory, and there is no such thing as bootstrap. Anyway, I try:

D:\boost_1_38_0> bin\bjam link=static threading=multi variant=debug toolset=msvc-9.0 --define=_HAS_ITERATOR_DEBUGGING=0 Libs\program_options\build

and it indeed makes a file with the same name as the one my program is linking to: libboost_program_options-vc90-mt-gd-1_38.lib, which I copy over the original.

It made no difference.

I don't think that's the specific problem, though, since it crashes on the constructor, not on some later usage from a different translation unit.

The call tree is:

foo.exe!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::program_options::variable_value,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::program_options::variable_value> >,0> >::_Init() Line 1180 + 0xe bytes

foo.exe!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::program_options::variable_value,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::program_options::variable_value> >,0> >::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::program_options::variable_value,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::program_options::variable_value> >,0> >(const std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > & _Parg=less, const std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::program_options::variable_value> > & _Al={...}) Line 511

foo.exe!std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::program_options::variable_value,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::program_options::variable_value> > >::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::program_options::variable_value,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::program_options::variable_value> > >() Line 104

foo.exe!boost::program_options::variables_map::variables_map() Line 172 + 0x40 bytes

foo.exe!main(int argc=1, char * * argv=0x01f84190) Line 179 + 0xb bytes


TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.



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