3

我正在 VS9 中开发一个 C++ 项目,该项目引用了许多头文件、.dll 和 .lib 文件。

我想将其作为包含所有依赖项的独立 DLL 输出,以便我可以使用 LoadLibrary() 将其拉入。

这是否可能,如果可以,我该如何在 VS9 中做到这一点?

我已经创建了 DLL,但是通过depends.exe 运行它会给我错误:

Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

谢谢

4

1 回答 1

2

如果其他 DLL 恰好是 CRT,则使用/MT编译将消除依赖关系。如果您正在处理一些其他 DLL,您可以将它们作为资源嵌入,然后在运行时加载它们。我自己从来没有这样做过,但你可以通过阅读以自己的方式工作:

于 2011-07-07T21:50:34.067 回答