Boost logo

Boost Users :

Subject: Re: [Boost-users] [thread] C++/CLI C# mixed code: linking to libthread yields runtime exception
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2009-02-04 10:56:47


Markus Werle <numerical.simulation_at_[hidden]> writes:

> In order to add to the headache, here is a "workaround":
>
> Add libboost_thread-vc90-mt-1_37.lib to the "Ignore Specific Library"
> linker property section, add boost_thread-vc90-mt-gd-1_37.lib to the
> "Additional Dependencies", et voila: after copying its sister
> boost_thread-vc90-mt-gd-1_37.dll into the directory of the executable,
> the executable runs fine.

You've forcibly replaced the static library with the DLL here. You're
better off defining the right compiler+preprocessor directives to ensure
that it is automatically selected. That way you'll ensure that the code
in the main EXE is compatible with that in the DLL.

Unfortunately, I can't remember what the required settings are at the
moment.

Anthony

-- 
Author of C++ Concurrency in Action | http://www.manning.com/williams
just::thread C++0x thread library   | http://www.stdthread.co.uk
Just Software Solutions Ltd         | http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

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