【发布时间】:2012-08-24 21:01:28
【问题描述】:
我正在尝试使用llvm-fs 项目,该项目为 F# 提供 llvm 绑定。我已经用--enable-shared 编译了LLVM-3.1.dll 文件,它现在与我编译的可执行文件位于同一目录中(我用Environment.CurrentDirectory 进行了检查)。 llvm-fs 中的DllImport 看起来像:
[<DllImport(
"LLVM-3.1.dll",
EntryPoint="LLVMModuleCreateWithName",
CallingConvention=CallingConvention.Cdecl,
CharSet=CharSet.Ansi)>]
extern void* (* LLVMModuleRef *) moduleCreateWithNameNative(string ModuleID)
然而,当我运行我的应用程序时,出现以下错误:
Unable to load DLL 'LLVM-3.1.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
如何获取要加载的 DLL?供参考,here's the exact DLL I'm trying to load。
【问题讨论】:
标签: .net f# llvm dllimport llvm-fs