运行时报错
StevenKSaint opened this issue · 3 comments
StevenKSaint commented
测试目标机器windows 2012 standard,执行时dll文件和exe在同一目录下,但是报错,报错如下。已确认生成的dll和exe能够在其他机器上正常运行。麻烦请教下,有遇到过这个问题吗?
panic: Failed to load 1.dll: The specified module could not be found.
goroutine 1 [running]:
syscall.(*LazyProc).mustFind(...)
syscall/dll_windows.go:323
syscall.(*LazyProc).Call(0xc0000c04b0, {0xc0000aa090, 0x2, 0x2})
syscall/dll_windows.go:339 +0x65
main.Lib({0xc0000d4c00, 0x39f, 0x39f})
./doing.go:44 +0xf2
main.main()
./doing.go:60 +0xca
Yeuoly commented
你是不是当前执行目录不是在exe的目录里
StevenKSaint commented
嗯,但是我加了绝对路径,本地测试是通过的
Yeuoly commented
加了绝对路径也是没用的,你可以看看那个go的脚本里,它是先在当前工作目录下寻找1.dll,再去调用这个dll里的api,你可以看到报错信息也是The specified module could not be found.