Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行时报错 #5

Open
StevenKSaint opened this issue Dec 5, 2023 · 3 comments
Open

运行时报错 #5

StevenKSaint opened this issue Dec 5, 2023 · 3 comments

Comments

@StevenKSaint
Copy link

测试目标机器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
Copy link
Owner

Yeuoly commented Dec 5, 2023

你是不是当前执行目录不是在exe的目录里

@StevenKSaint
Copy link
Author

嗯,但是我加了绝对路径,本地测试是通过的

@Yeuoly
Copy link
Owner

Yeuoly commented Dec 6, 2023

加了绝对路径也是没用的,你可以看看那个go的脚本里,它是先在当前工作目录下寻找1.dll,再去调用这个dll里的api,你可以看到报错信息也是The specified module could not be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants