如何使用所有库在 wxSmith ( Codeblocks ) 中编译程序?
我在 Codeblocks(wxWidgets 应用程序)中创建了一个程序,我已经编译了它,并且从 codeblocks 界面执行时它运行完美......但是,当我进入发布文件夹并运行可执行文件时,它给了我 *.dll 文件错误: / 我该如何制作程序?
I have created a program in Codeblocks (wxWidgets Application) I have compiled it and it runs perfectly when executed from the codeblocks interface ....however when i go into the release folder and run the executable it gives me *.dll file errors :/
How do i make the program ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Code:Blocks 很可能具有包含库路径的可执行路径的默认设置。当 Windows 使用 PATH 环境变量查找 DLL 时,这将确保您的应用程序在 CodeBlocks 内运行。
但是,为了在 CodeBlocks 之外运行它,您需要将所有依赖项复制到保存应用程序的目录中,或者必须设置 PATH 变量以包含保存依赖项的目录。
There's a good chance that Code:Blocks has a default setting for the executable path that includes the path to the libraries. As Windows finds the DLLs using the PATH environment variable this will ensure that your application works inside CodeBlocks.
However in order to run it outside CodeBlocks you'd need to either copy all the dependencies into the directory that holds your application or you'll have to set your PATH variable to include the directories that hold the dependencies.