我已阅读多篇与此主题相关的文章,但都没有使我能够构建静态链接的exe文件。
在我的发布配置(x64)中,我有以下设置:
Configuration Properties -> General : Use of MFC - Use MFC in a Static Library
Configuration Properties -> C/C++ -> Code Generation : Runtime Library - Multi-threaded (/MT)
Configuration Properties -> Linker -> Command Line : Additional Options - 我拥有所有必需的Windows库“kernel32.lib”等(因为使用MFC会将它们从上面的“All Options”窗口中移除)
Configuration Properties -> Manifest Tool -> Input and Output : Embed Manifest - No
请注意,在Configuration Properties -> Linker -> Input中,我正在使用5个lib文件,例如glfw3.lib,并且我正在使用完全优化(/Ox)。
构建项目并运行exe后,我收到错误信息:“代码执行无法继续,因为找不到glfw3.dll”等。
使用dependencywalker,我可以看到它需要与libs关联的dlls,而它当然找不到。
我是否误解了如何做这件事,或者还有其他可能出错的地方?
(我使用Visual Studio 2017)
在我的发布配置(x64)中,我有以下设置:
Configuration Properties -> General : Use of MFC - Use MFC in a Static Library
Configuration Properties -> C/C++ -> Code Generation : Runtime Library - Multi-threaded (/MT)
Configuration Properties -> Linker -> Command Line : Additional Options - 我拥有所有必需的Windows库“kernel32.lib”等(因为使用MFC会将它们从上面的“All Options”窗口中移除)
Configuration Properties -> Manifest Tool -> Input and Output : Embed Manifest - No
请注意,在Configuration Properties -> Linker -> Input中,我正在使用5个lib文件,例如glfw3.lib,并且我正在使用完全优化(/Ox)。
构建项目并运行exe后,我收到错误信息:“代码执行无法继续,因为找不到glfw3.dll”等。
使用dependencywalker,我可以看到它需要与libs关联的dlls,而它当然找不到。
我是否误解了如何做这件事,或者还有其他可能出错的地方?
(我使用Visual Studio 2017)