我正在尝试将Mono嵌入到我的C / C ++应用程序框架(游戏引擎)中,但是我在尝试运行它时遇到了麻烦:我收到以下错误
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the 'G:\Users\MattMatt\Workspace\SpikyEngine\lib\mono\4.5\mscorlib.dll' directory'.
问题是我在单声道安装目录中找不到mscorlib.dll
名称的任何文件;有什么建议?这是我的代码:
#include "../include/Spiky/System/Log.h"
#include <mono/jit/jit.
int main(int argc, char **argv)
{
MonoDomain *domain;
domain = mono_jit_init("test");
MonoAssembly *assembly;
assembly = mono_domain_assembly_open(domain, "file.exe");
if (!assembly)
{
SPIKY_LOG(spiky::LOG_LEVEL_ERROR)
<< "@Mono Couldn't load assembly code from 'file.exe'";
}
return 0;
}
答案 0 :(得分:0)
我终于解决了它。我只需要指向单声道汇编目录,这样:
mono_set_dirs("...\\Mono\\lib", "...\\Mono\\etc");