3

即使我在发布模式下构建 exe,当我尝试在另一台 PC 上执行该程序时,我也会收到 DLL not found 错误。所以我需要找出我的程序需要哪些 dll 并用 exe 复制它们。但我似乎无法弄清楚如何找到我的程序使用的 dll。

#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include "SDL_mixer.h"
#include <string>
#include "head.h"
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <windows.h>

我很确定它需要什么 dll 是基于包含的,所以它们就在这里。我知道 SDL 库使用了哪些库,但我不知道其他库。

4

3 回答 3

8

Dependency Walker可能会有所帮助。看看下面的应用程序屏幕截图。

在此处输入图像描述

于 2013-04-19T03:07:50.740 回答
3

用于dumpbin打印可执行文件或 DLL 所需的所有动态库:

dumpbin /dependents myprog.exe

通常你可以dumpbin.exe在目录中找到"C:\Program Files (x86)\Microsoft Visual Studio XXX\VC\bin"

于 2013-04-19T03:08:30.650 回答
2

在运行 exe 之前,您可以使用依赖遍历器查看所有依赖是否可用:

于 2013-04-19T03:07:36.233 回答