Problems to compile raylib game using Raylib 2.0

Hello there!
I extracted the release folder from github repository, but when I try to compile my code I get errors like:

../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Developement\raylib-2.0\libs\win32\mingw32/libraylib.a when searching for -lraylib
../x86_64-w64-mingw32/bin/ld.exe: cannot find -lraylib

I am using this command to compile the code:
gcc -o raylib.exe raylib.c -IC:\Developement\raylib-2.0\include -LC:\Developement\raylib-2.0\libs\win32\mingw32 -lraylib -lopengl32 -lgdi32

Any tips to fix this problem? Thank you.

Comments

  • Are you working in Windows? I recommend using the Windows installer, it already setups everything for you.
  • Sorry for the delay, I had to leave the computer for a while.

    I'm actually not interested in using the Windows installer because I already have mingw and notepad++ installed, I just want to use these precompiled libraries that you made avaliable in the git repository. Thank you for your compreension.
  • It seems that the precompiled library is not compatible with your version of MinGW, if you want to use your current MinGW, you should recompile raylib library from sources.

    To do that, just go to raylib/src folder and execute in the command line:

    make PLATFORM=PLATFORM_DESKTOP
  • Well, I'm using mingw from msys2. Could this be the cause of the problem?
  • Most probably. But it shouldn't be a big issue, just recompile raylib from sources and then it should work ok.
Sign In or Register to comment.