C++ win32 dll 引用外部CLR,加载托管程序集异常-Error 10 error LNK2019: unresolved external symbol _CLRCreateInstancet

异常:

Error 10 error LNK2019: unresolved external symbol _CLRCreateInstance@12 referenced in function "unsigned long __stdcall StartTheDotNetRuntime(void *)" (?StartTheDotNetRuntime@@YGKPAX@Z) E:\C++\VC项目\NativeDll\NativeDll.obj NativeDll

 

解决措施: native.dll  头文件引用下加上:#pragma comment(lib, "mscoree.lib")    即可!

posted @ 2014-10-18 13:09  royalwong_real  阅读(232)  评论(0编辑  收藏  举报