GCC找不到-lSDL2

时间:2017-04-27 19:15:04

标签: c linux gcc

我正在尝试从https://github.com/FWGS/xash3d(一个开源hl1引擎)编译Xash3d,我正在使用ubuntu 16 64位,并且在运行makefile时出现此错误:

/usr/bin/ld: skipping incompatible /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../libSDL2.so when searching for -lSDL2 /usr/bin/ld: skipping incompatible /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../libSDL2.a when searching for -lSDL2 /usr/bin/ld: skipping incompatible //usr/local/lib/libSDL2.so when searching for -lSDL2 /usr/bin/ld: skipping incompatible //usr/local/lib/libSDL2.a when searching for -lSDL2 /usr/bin/ld: cannot find -lSDL2 /usr/bin/ld: skipping incompatible /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status Makefile.linux:107: recipe for target 'xash' failed make: *** [xash] Error 1 我已经为32位和64位安装了libsdl2-dev软件包。 这是makefile:

gcc -g -o xash -fvisibility=hidden  -m32 ... -lm -lSDL2 -pthread -lX11 -ldl

我还尝试使用标志-lSDL2编译其他项目,并且编译得很好。 任何线索?

0 个答案:

没有答案