This seems like it has something to do with what is loaded by default withing an development environment. Also, since this is windows, rule out the standard suspects. Break out dependency walker, and check what dll's are being loaded. Debug and release dll's may be different, and this could possibly cause a problem. Also it might be possible, in the release build, some dll is not available or even some weird manifest issue that prevents the loading of the correct dll. This usually appears at start but who knows. Since DateTime is a library (not header only), confirm that both a debug and release build exist, or at least that the library that your executable is using exists and that the dll's that the datetime library is linked against are compatible with the ones that your executable are using. Carl Jared Lee Richardson wrote:
On Tue, Apr 14, 2009 at 1:56 AM, Igor R
wrote: I'm having a strange issue with the boost::date_time library - My program runs fine with both release and debug compilations, but will not run in standalone / the command line. I.e., the program works when I run it through the MS visual studio debugger, whether the program is built with debugging symbols or not. It also ran correctly when run through dependency walker. Ensure that all your libs are built with the same CRT/ STL options (threading, _SECURE_SCL etc.)
Hmm, I tried to find anything on that, but I couldn't. I'm not sure what the boost libraries I'm using were built with, but I don't have anything special in my builds. No multithreading(yet), none of those defines.
Perhaps try to make it a release build and then switch on some symbols if possible ?
Actually it runs fine without any symbols at all. It only crashes if no other program is hooked, like a debugger or dependencywalker.
I discovered that the problem happens/can happen on one of several new calls, but only when linking to the date_time libraries. I removed everything from my project except the offending code, and the crash only went away when I stopped linking to date_time. I even changed the type of variable I am allocating to double instead of time_duration, and it only goes away if I stop linking to date_time.
I'm going to try to remove even more code and narrow it down, and then I'll paste the offending code. Basically all I'm doing right now is initializing some time variables, then opening and reading from a file. It crashes on allocating 5 chars inside a function that reads from a file(or on allocating the class that contains a std::list<double> and a double).
Any other ideas?
Thanks, Jared. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Carl Zmola czmola@woti.com