Hey! raylib forum is closing!

After a year with not much movement in the forum I decided to close it.

The cost of maintaining the hosting is a bit high for the usage of the platform, updating the forum and managing it is also a bit cumbersome and the truth is that I'm already trying to maintain multiple other networks pretty more active than this forum.

I'll recommend you to move to the other raylib networks:

- For a forum style, use Reddit: https://www.reddit.com/r/raylib/
- For direct messaging and questions, use Discord: https://discord.gg/VkzNHUE
- To report issues, use GitHub: https://github.com/raysan5/raylib

- Also, remember you can contact me personally on Twitter: https://twitter.com/raysan5 or directly by mail to ray[at]raylib.com

If you feel generous, you can also contribute to the project on my Patreon: https://www.patreon.com/raylib

Thanks to you all for joining the project and help to improve it with your questions. Keep it up! :)

Best Regards,


PD. Closing will be effective by October 31th.

GCC command to compile

Could someone please show me an example of compiling the source code for one of the sample programs here on the command line?


  • Hi fistfullofnails,

    Here it is the command line to compile latest raylib examples:

    gcc -o my_game.exe my_game.c -I../../src -Iexternal -lraylib -lopengl32 -lgdi32 -std=c99

  • edited June 17
    I get "raylib.h: No such file or directory" when I enter the command. I am running Ubuntu if that is of any difference. I see the raylib.h file in the raylib/src directory. Which directory should I be in when trying to run the command example you gave me? I'm very stupid, so some things you think might be obvious could be going right over my head.
  • ok, to compile for Ubuntu you need the following line:

    gcc -o my_game.exe my_game.c -I../../src -Iexternal -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

    Just make sure that -I{path_to_raylib.h} is defined properly.
  • edited June 17
    Now it says:

    /usr/bin/ld: cannot find -lraylib
    collect2: error: ld returned 1 exit status

    This is what I put in for the path:

  • Also add -L{path_to_libraylib.a}
  • Strangely enough, in my case, I couldn't compile because the target directory didn't exist. After I created the folders manually, it compliled with no problems.
  • By the way my system is Windows 8.1 64bit, using mingw.
  • yeah, I'm aware of that issue...
  • I forgot to give congrats for the 2.0 release. The reason I stepped into this folder problem is because I'm trying to write a Python binding for raylib. At the moment it seems to work ok under Python3.7 32bits on Windows (didn't tested heavily yet) but i'll have to look for help on the other platforms. There's a lot to do.
  • oooh! That sounds amazing to me! A Python binding was a missing piece for raylib! Please, keep me updated with your progress! :D
  • I'm very interested in Python bindings for raylib too.

    I have a microcomputer thing I'm doing with RPi. The stack is based around ARM V8 Assembly, C (with raylib) and CPython (with Prompt Toolkit). It'd be really nice for new users to be able to do basic graphics with Python, and the OS only has terminals and raylib, so these bindings would tie everything together.

    I'm happy to help testing whenever you're ready, 80'sJay. I've have a few of the non-Windows platforms.
Sign In or Register to comment.