0

i am trying to compile Xash3d from https://github.com/FWGS/xash3d (an open source hl1 engine), i am using ubuntu 16 64 bits and when running the makefile i get this error:

/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 I have installed the libsdl2-dev package for both, 32 and 64 bits. This is the makefile out:

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

I have also try to compile other projects with the flag -lSDL2 and they compile just fine. Any clue?

Rattata 2me
  • 37
  • 2
  • 5
  • Possible duplicate of [/usr/bin/ld: skipping incompatible foo.so when searching for foo](http://stackoverflow.com/questions/16927885/usr-bin-ld-skipping-incompatible-foo-so-when-searching-for-foo) – cocosushi Apr 27 '17 at 19:19
  • »» i am using ubuntu 16 64 bits «« : Ubuntu : There is no SDL2 or gcc in /usr/local/. Unless you installed some home made files . Please use the Ubuntu packages : `sudo apt install libsdl2-dev g++ g++-4.7 g++-4.8 g++-4.9` . Then you have all versions gcc-4.7 ... gcc-5.3 . – Knud Larsen Apr 28 '17 at 18:11
  • I Installed g++ 6, and i have tried doing http://stackoverflow.com/questions/16927885/usr-bin-ld-skipping-incompatible-foo-so-when-searching-for-foo without any change. – Rattata 2me Apr 29 '17 at 09:59

0 Answers0