|
Boost Users : |
Subject: Re: [Boost-users] wrap native C++ DLL used Boost libs, into .NET
From: Cory Nelson (phrosty_at_[hidden])
Date: 2008-09-08 09:35:49
On Mon, Sep 8, 2008 at 12:13 AM, <aidforsoft_at_[hidden]> wrote:
> Hi Boris.
>
>>> [...]I found same problems in Internet - impossible to wrap native DLLs,
>>> used
>>> Boost. All this problems were unsolved.
>>> Such as:
>>> http://objectmix.com/dotnet/121318-not-valid-win32-application-exception-hresult-0x800700c1.html
>
>> as it turns out you are referring to a thread which I had started. Looking
>> at that thread I think I solved the problem by moving #include
>> <boost/thread/mutex.hpp> from a header file to a .cpp file (so the C++/CLI
>> project which includes the header files of my native C++ project doesn't
>> include this Boost header anymore). At least I can and do ship a .NET
>> library built on top of a C++ DLL which uses Boost 1.34.1. I'm not sure if
>> your problem is similar to mine but I could fix mine.
>
> Thanks.
> In my case, all Boost headers has located inside .cpp files only. So
> the C++/CLI DLL doesn't include Boost headers, but I cann't solve the
> problem of System.BadImageFormatException.
>
This sounds like the error you get when trying to use a native 32-bit
DLL in a 64-bit (or vice-versa) .NET process.
-- Cory Nelson
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