0

在 VS 2005 中,我可以libs通过在 IDE 中显式设置选项来查看链接器正在搜索的路径。如何找到相应dll的加载位置?

1>Searching libraries
1>    Searching C:\Program Files (x86)\Microsoft Visual Studio 8\VC\lib\msvcrtd.lib:
1>      Found _memcpy
1>        Referenced in deflate.obj
1>        Referenced in gzio.obj
1>        Referenced in infback.obj
1>        Referenced in inflate.obj
1>        Loaded msvcrtd.lib(MSVCR80D.dll)

在上述情况下,MSVCR80D.dll来自哪里?我在VC目录中搜索了dll,弹出了10多个结果。有什么简单的方法可以找到准确加载的内容吗?

4

1 回答 1

3

The DLLs are actually loaded at runtime, not at link time. Actually, native DLLs don't even have to be present in the machine to do the link.

You can see that information running your program in the debugger (usually F5) and the opening the "Modules window" from the "Debug" submenu, IIRC.

Also, you can analyze the executable and try deducing which DLL will be loaded. The best tool for that is, no doubt, the Dependency Walker. It can analyze DLLs too (cool) but it may have troubles with managed DLLs.

于 2012-08-29T21:38:03.547 回答