Hi,
I've been trying to use the boost local_time() function in a win32 program using
mingw. After I inserted the call into my program, the program started to crash.
So, I wrote a very simple test program:
#include <iostream>
#include
On Mon, Apr 20, 2009 at 5:36 PM, Del
Hi,
I've been trying to use the boost local_time() function in a win32 program using mingw. After I inserted the call into my program, the program started to crash. So, I wrote a very simple test program:
#include <iostream> #include
using namespace boost::posix_time; int WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { ptime time = microsec_clock::local_time();; std::cout << "The current time is " << time << std::endl; return 0; }
It compiles and links fine, but when I run the program, I end up with this error message:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
Any ideas?
I'm not familiar with the library you're using, but I see that error message when I get an uncaught exception. Put a try/catch handler around the first two lines to investigate/eliminate that possibility. Peter Barker
Making a guess. The WinMain is for windows applications with out a console. You are using 'cout' which is console output. Since there is no console, that could be throwing an exception. Just try commenting out the 'cout' line and test again. -dhruva ----- Original Message ----
From: Peter Barker
To: boost-users@lists.boost.org Sent: Wednesday, 22 April, 2009 5:00:17 PM Subject: Re: [Boost-users] ptime on Win32? On Mon, Apr 20, 2009 at 5:36 PM, Del wrote:
Hi,
I've been trying to use the boost local_time() function in a win32 program using mingw. After I inserted the call into my program, the program started to crash. So, I wrote a very simple test program:
#include #include
using namespace boost::posix_time; int WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { ptime time = microsec_clock::local_time();; std::cout << "The current time is " << time << std::endl; return 0; }
It compiles and links fine, but when I run the program, I end up with this error message:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
Any ideas?
I'm not familiar with the library you're using, but I see that error message when I get an uncaught exception. Put a try/catch handler around the first two lines to investigate/eliminate that possibility.
Peter Barker _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/
Hi,
I just tried the following code and it works. With winmain, I do not see any output but no exception.
#include
From: Peter Barker
To: boost-users@lists.boost.org Sent: Wednesday, 22 April, 2009 5:00:17 PM Subject: Re: [Boost-users] ptime on Win32? On Mon, Apr 20, 2009 at 5:36 PM, Del wrote:
Hi,
I've been trying to use the boost local_time() function in a win32 program using mingw. After I inserted the call into my program, the program started to crash. So, I wrote a very simple test program:
#include #include
using namespace boost::posix_time; int WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { ptime time = microsec_clock::local_time();; std::cout << "The current time is " << time << std::endl; return 0; }
It compiles and links fine, but when I run the program, I end up with this error message:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
Any ideas?
I'm not familiar with the library you're using, but I see that error message when I get an uncaught exception. Put a try/catch handler around the first two lines to investigate/eliminate that possibility.
Peter Barker _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/
participants (3)
-
Del
-
dhruva
-
Peter Barker