Boost logo

Boost Users :

Subject: [Boost-users] ptime on Win32?
From: Del (delmyers.cs_at_[hidden])
Date: 2009-04-20 12:36:51


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 <boost/date_time/posix_time/posix_time.hpp>

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?


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