Sto provando a utilizzare il progetto llvm-fs, che fornisce binding llvm per F #. Ho compilato il file LLVM-3.1.dll
con --enable-shared
e ora risiede nella stessa directory del mio eseguibile compilato (ho controllato con Environment.CurrentDirectory
). Il DllImport
in LLVM-fs assomiglia:DllImport non riesce a trovare dll anche se dll si trova nella stessa cartella del file eseguibile
[<DllImport(
"LLVM-3.1.dll",
EntryPoint="LLVMModuleCreateWithName",
CallingConvention=CallingConvention.Cdecl,
CharSet=CharSet.Ansi)>]
extern void* (* LLVMModuleRef *) moduleCreateWithNameNative(string ModuleID)
Eppure, quando eseguo la mia applicazione esso errori con:
Unable to load DLL 'LLVM-3.1.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Come faccio ad avere il DLL da caricare? Per riferimento, here's the exact DLL I'm trying to load.