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-05 11:18:16


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

> Alas, for the RealWorld example containing some more spirit parser
> code this does not help either. The linker now correctly chooses
> the DLL:
>
> Linking...
> Searching libraries
> Searching D:\Programme\Microsoft Visual Studio 9.0\VC\lib\MSVCRT.lib:
> Searching D:\Programme\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
> Searching D:\Programme\Microsoft Visual Studio 9.0\VC\lib\MSVCMRT.lib:
> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib:
> Searching D:\Programme\Microsoft Visual Studio 9.0\VC\lib\msvcprt.lib:
> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib:
> Searching D:\Programme\Microsoft Visual Studio 9.0\VC\lib\comsupp.lib:
> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib:
> Searching D:\FEV-Data\Sourcen\FEV\TOPexpert\3rdParty\BOOST\boost_1_37_0
> \stage\lib\boost_thread-vc90-mt-1_37.lib:
> Searching D:\FEV-Data\Sourcen\FEV\TOPexpert\3rdParty\BOOST\boost_1_37_0
> \stage\lib\libboost_date_time-vc90-mt-1_37.lib:
>
> but the executable shows the System.BadImageFormatException again.
>
> Any further idea?

Nope. I've never tried it myself; I just knew that TLS usage was a
definite problem.

> Am I not allowed to mix the static inclusion of date_time with the dynamic
> version of threads?

That shouldn't be a problem, because the parts of date-time used by
threads are all header-only anyway.

Sorry, but I have no further suggestions at this time.

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