我想将 libmono 编译为 Windows 静态库 。
目标平台是 Windows x86。 建设环境: Windows 7 64比特, VC++ Express 2010
我已经做过的事
1) Downloaded mono 2.10.8 sources.
2) Opened mono.sln from msvc folder and ensured that everything is compilling.
3) Then i ve made some changes:
3.1) General->Project Defaults->Configuration Type: Static library (.lib)
3.2) General->Project Defaults->Use of MFC: Use Standard Windows Libraries
3.3) C/C++->Code Generation->Runtime Library: Multi-threaded (/MT)
4) Built it and VC++ 2010 successfully created mono-2.0.lib
5) Added it in linker inputs of my own project (that i want to embed mono in) with:
5.1) General->Project Defaults->Configuration Type: Application (.exe)
5.2) General->Project Defaults->Use of MFC: Use MFC in a Ststic Library
5.3) C/C++->Code Generation->Runtime Library: Multi-threaded (/MT)
它似乎近乎完美,但涉及一些可怕的问题:字典与lt;TKey,TSourcs>
Is everything done correct? Should i specify any other compiler options or preprocessor directives?
<强势>P.S.: 强势 > libmono指挥线是:
/I"..libgcinclude" /I".." /I"..mono" /I"..monojit" /I"..monoeglibsrc" /I"....monoeglibsrc" /I"..eglibsrc" /Zi /nologo /W1 /WX- /O1 /Ob1 /Oi /Oy- /D "NDEBUG" /D "i386" /D "TARGET_X86" /D "i386" /D "WIN32" /D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "WINDOWS" /D "HOST_WIN32" /D "TARGET_WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "GC_NOT_DLL" /D "HAVE_CONFIG_H" /D "WINVER=0x0500" /D "_WIN32_WINNT=0x0500" /D "_WIN32_IE=0x0501" /D "WIN32_THREADS" /D "FD_SETSIZE=1024" /D "default_codegen" /D "MONO_ASSEMBLIES=0" /D "_UNICODE" /D "UNICODE" /GF /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fp".Release/libmono.pch" /Fa"Win32objlibmono" /Fo"Win32objlibmono" /Fd"Win32objlibmonovc100.pdb" /Gd /TC /analyze- /errorReport:queue
<强>UPD: 强>