Even when I build an exe in release mode, when I try to execute the program on another PC, I get DLL not found errors. So I need to find out which dlls my program needs and copy them with the exe. But I can't seem to figure out how to find what dlls my program uses.
#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>
I'm pretty sure what dll's it needs is based on the includes so here they are. I know which ones are used by the SDL libraries but I don't know the others.
Dependency Walker might help. Have a look at the application screen-shot below.
Use dumpbin
to print all dynamic libraries required by your executable or DLL:
dumpbin /dependents myprog.exe
Typically you can find dumpbin.exe
in directory "C:\\Program Files (x86)\\Microsoft Visual Studio XXX\\VC\\bin"
.
在运行exe之前,您可以使用依赖walker来查看是否所有依赖都可用:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.