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.
Your email is nothing but blackness, if you are going to specify a foreground color, then make certain to specify a background color, since some people (like me) have a black background by default, and your background is set to transparent, and you have black foreground text, black text on black background makes for it all invisible. It is best to send in pure text mode regardless, but if you *have* to send in richtext/html mode, then *always* set a background color if you set a foreground color. On Tue, May 11, 2010 at 4:49 PM, John Dlugosz <JDlugosz@tradestation.com> wrote: > 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. That is very likely, I set that in everything I compile, have to watch out for it. On Tue, May 11, 2010 at 4:49 PM, John Dlugosz <JDlugosz@tradestation.com> wrote: > 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 That is because your boost is rather old, 1.38, the bootstrap and such was added later on (1.40 I think?), you should update, and be sure to rebuild with the proper define set as you did above. On Tue, May 11, 2010 at 4:49 PM, John Dlugosz <JDlugosz@tradestation.com> wrote: > 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. If it made no difference, it might be one of the other options that do similar breakage like _HAS_ITERATOR_DEBUGGING. You can test it by debugging into your project and seeing the generated assembly. On Tue, May 11, 2010 at 4:49 PM, John Dlugosz <JDlugosz@tradestation.com> wrote: > 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 Hmm, do you have a complete compilable example demonstrating this problem? I will not be able to test it (for a week or so), but others can.
Your email is nothing but blackness, if you are going to specify a foreground color, then make certain to specify a background color, since some people (like me) have a black background by default, and
I have no idea what you are talking about. I sent "plain text", not a formatted or rich message in any manner whatsoever.
your background is set to transparent, and you have black foreground text, black text on black background makes for it all invisible. It is best to send in pure text mode regardless,
I always do. Outlook must have gotten confused when I pasted material in that was on the clipboard from the debugger. I'm sorry about that.
That is because your boost is rather old, 1.38, the bootstrap and such was added later on (1.40 I think?), you should update, and be sure to rebuild with the proper define set as you did above.
Since Boost is being used by other projects in the suite, I don't want to "change" anything or mess up their builds. I'm wondering how it manages to work for anyone, though, at this point.
If it made no difference, it might be one of the other options that do similar breakage like _HAS_ITERATOR_DEBUGGING. You can test it by debugging into your project and seeing the generated assembly.
Looking at my project, the #define's are: WIN32;_DEBUG;_CONSOLE;_HAS_ITERATOR_DEBUGGING=0;NO_DLL_INTERFACE that last one turns off the __declspec(import/export) attributes in some of the source files I'm compiling, and should not affect anything else. The others are normal Windows stuff.
Hmm, do you have a complete compilable example demonstrating this problem? I will not be able to test it (for a week or so), but others can.
It's straight from the example. int main (int argc, char* argv[]) { cout << "running." << endl; namespace po = boost::program_options; po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("COM", po::value<bool>(), "test COM implementation") ; po::variables_map vm; //////////// crashes in that constructor 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.
On Wed, May 12, 2010 at 12:46 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:
Your email is nothing but blackness, if you are going to specify a foreground color, then make certain to specify a background color, since some people (like me) have a black background by default, and
I have no idea what you are talking about. I sent "plain text", not a formatted or rich message in any manner whatsoever.
Outlook did it then, the source of your message contains a lot of this kind of stuff: """ <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m= icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office= :access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"= uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof= t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co= """ On Wed, May 12, 2010 at 12:46 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:
your background is set to transparent, and you have black foreground text, black text on black background makes for it all invisible. It is best to send in pure text mode regardless,
I always do. Outlook must have gotten confused when I pasted material in that was on the clipboard from the debugger. I'm sorry about that.
No problem, you might change your outlook rich-text message defaults to include a background color then, just-in-case. On Wed, May 12, 2010 at 12:46 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:
That is because your boost is rather old, 1.38, the bootstrap and such was added later on (1.40 I think?), you should update, and be sure to rebuild with the proper define set as you did above.
Since Boost is being used by other projects in the suite, I don't want to "change" anything or mess up their builds. I'm wondering how it manages to work for anyone, though, at this point.
No big point for that, just that is the reason that bootstrap does not exist, it builds bjam and in the future may start to set some global variable for the build process to simplify. On Wed, May 12, 2010 at 12:46 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:
If it made no difference, it might be one of the other options that do similar breakage like _HAS_ITERATOR_DEBUGGING. You can test it by debugging into your project and seeing the generated assembly.
Looking at my project, the #define's are:
WIN32;_DEBUG;_CONSOLE;_HAS_ITERATOR_DEBUGGING=0;NO_DLL_INTERFACE
that last one turns off the __declspec(import/export) attributes in some of the source files I'm compiling, and should not affect anything else. The others are normal Windows stuff.
Hmm, do you have a complete compilable example demonstrating this problem? I will not be able to test it (for a week or so), but others can.
It's straight from the example.
int main (int argc, char* argv[]) { cout << "running." << endl; namespace po = boost::program_options; po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("COM", po::value<bool>(), "test COM implementation") ; po::variables_map vm; //////////// crashes in that constructor
The example tests build fine the build-bots for Visual Studio. Can you attach *your* complete project with your build settings and such and I can try it locally? My programming computer should be back up soon. if you have VS2k5, try to send it as that as that is what I have, along with your built executable and I can check its disassembly directly.
From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of OvermindDL1
No problem, you might change your outlook rich-text message defaults to include a background color then, just-in-case.
Any idea how to do that? I just looked through the options, and I have "stationary" and "themes" etc. turned off. Default font is selected to my liking, and color is "automatic".
The example tests build fine the build-bots for Visual Studio. Can you attach *your* complete project with your build settings and such and I can try it locally? My programming computer should be back up soon. if you have VS2k5, try to send it as that as that is what I have, along with your built executable and I can check its disassembly directly.
Thanks. I'll try a minimal source file stripped down from the project options I'm using, and see if that has the problem. Might be a couple days, though. --John 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.
On Mon, May 17, 2010 at 12:39 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:
From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of OvermindDL1
No problem, you might change your outlook rich-text message defaults to include a background color then, just-in-case.
Any idea how to do that? I just looked through the options, and I have "stationary" and "themes" etc. turned off. Default font is selected to my liking, and color is "automatic".
Unsure, I managed to even get out of using it at work with some Exchange server work-arounds and forwarding. :) On Mon, May 17, 2010 at 12:39 PM, John Dlugosz <JDlugosz@tradestation.com> wrote:
The example tests build fine the build-bots for Visual Studio. Can you attach *your* complete project with your build settings and such and I can try it locally? My programming computer should be back up soon. if you have VS2k5, try to send it as that as that is what I have, along with your built executable and I can check its disassembly directly.
Thanks. I'll try a minimal source file stripped down from the project options I'm using, and see if that has the problem. Might be a couple days, though.
That would be perfect, will be available Tuesday evening or Wednesday day/night at the earliest.
Try without '--' before 'define'
Thanks for the suggestion, but the result was binary equal. 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.
participants (3)
-
Ilya Sokolov
-
John Dlugosz
-
OvermindDL1