Boost logo

Boost Users :

From: Edward Diener (eldiener_at_[hidden])
Date: 2007-12-20 18:08:41


Jason McGuidwin wrote:
> Edward ,
>
> I think that is want i am doing below is my other posting that knowone has
> replyed yet.
> "VS2005 threads with clr option not working"
> hello,
>
> I am trying to compile a simple proragm with the thread headers included and
> the clr option in VS2005

Your program looks like a console application because of the 'main'
function. Why are you attempting to create a console application using CLR ?

Given that you are doing so, did you use the IDE to create a project and
specify CLR console application as the project type ? If not that should
be your first step.

>
> 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."

I have not used the thread library in a C++/CLI mixed mode project,
although I have used other Boost libraries, including regex++, which has
DLLs which have to be built.

But I have always setup my project from the IDE, as it invariably
creates the basic settings correctly. I wouldn't touch command line
building unless I converted the IDE setup to a command line system (
lookup MSBuild in order to do so ).

In the CLR console application in the IDE, the default is that it links
with the multi-threaded RTL DLL. You need to make sure that when you use
Boost thread you are also linking to the version built with the
multi-threaded RTL. Also always keep release annd debug build in synch
with Boost versions that also link to the correct RTL as there are
release and debug version of the VC RTLs and they should never be mixed.


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