|
Boost Users : |
From: Jason McGuidwin (jmcguidwin_at_[hidden])
Date: 2007-12-19 12:48:55
hello,
I am trying to compile a simple proragm with the thread headers included and the clr option in VS2005
When i include the thread headers and set the to compile with the /clr option the app will not execute and give the error below:
"The application failed to initialize properly (0xc000007b). Click on OK to terminate the application."
this sample program works fine without the clr option, however I am writing a managed c++ app that needs this option on.
also I have used the lib installer from http://www.boost-consulting.com/products/free
the 1.34.1 installer for vs8.0, I have selected all options and still does not work.
I have tried defining BOOST_THREAD_USE_DLL and BOOST_THREAD_USE_LIB, still fails.
BOOST_THREAD_USE_LIB error message is the same as if I did not have this define.
BOOST_THREAD_USE_DLL error message: "This application has failed to start because boost_threads-vc80-mt-gd-1_34_1.dll was not found. Re-Installing the application may fix this problem."
my project prefs have the following settings:
c/c++ - additional include directories= "C:\Program Files\Boost\boost_1_34_1\"
linker - additional include directories= "C:\Program Files\Boost\boost_1_34_1\lib"
[code]
#include "stdafx.h"
#include <iostream>
#include <boost/timer.hpp>
//#define BOOST_THREAD_USE_DLL
//#define BOOST_THREAD_USE_LIB
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
int main(int argc, char* argv[])
{
boost::xtime expiration;
boost::timer the_timer; //starts the timer
std::cout<<"Welcome to the sample program!"<<std::endl;
for(int i = 0;i <1000000; i++)
{
if(i%100000 == 0)
{
std::cout<<".";
boost::xtime_get(&expiration, boost::TIME_UTC);
expiration.nsec +=int(5 * 1e08);// half second;
boost::thread::sleep(expiration);
}
}
std::cout<<std::endl<<"This program has been running for: "<< the_timer.elapsed() <<" second(s)." << std::endl;
std::cout<< std::endl<<"Press any key then enter to exit. "<< std::endl;
char buff[100];
std::cin>>buff;
}
[/code]
Jason McGuidwin
Gnostech Inc. San Diego, Ca
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