项目上遇到的问题:c++编写的类使用托管c++包装成dll提供给c#项目使用。c++需要使用boost,clr,项目目标平台都是win32/x86。开发环境win10 x64系统,vs2013,.Net Framework 4.0,boost 1.55。
【问题表现】c#程序在win10 x86/x64正常运行,但在win7 x86/x64运行时发生异常:
Additional information: Could not load file or assembly “LicenseClientDLL_D.dll” or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT:0x800700C1)
【原因】boost库默认使用静态链接方式,但boost静态链接库和C++/clr不兼容,所以要换成动态链接。
stackoverflow上相关资料:
[引用]Too many comments in the net saying boost static libs and CLR are not compatible.
[引用]It was th