SDL Linker error on mingw/msys: ld.exe cannot find -lSDL

北城余情 提交于 2019-12-13 00:42:29

问题


Problem is actually that my compiler doesn't find the SDL library files. I rounded down possible errors by removing all SDL files, reinstalling SDL and compiling without SDL_image. No help.

Files I copied from SDL-devel-1.2.15-mingw32.tar.gz package:

sdl\include to mingw\include\sdl (I later copied files to mingw\include root as well)
sdl\lib to mingw\lib (3 files: libSDL.dll.a libSDLmain.a and libSDL.la)
sdl.dll and sdl-config to mingw\bin

I installed it via msys, and later manually just to make sure, and also copied same files to corresponding places in msys folder.

The error message:

c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lSDL

I have been using a simple make command in msys console, I moved the options for build into makefile to make things easier.

I'm using WinXP, MinGW/MSYS, SDL 1.2.15 and trying to compile fheroes2 source code.

来源:https://stackoverflow.com/questions/26748878/sdl-linker-error-on-mingw-msys-ld-exe-cannot-find-lsdl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!