Re: HELP RayGui DLL
- Posted by ghaberek (admin) in January
- 571 views
I don't think I've ever tried building any of the raylib projects from source. Could you share some of the errors you're getting?
The building directions for raygui don't make any reference to raylib. So you're probably getting errors trying to find any of the raylib functions.
I think they're assuming you're linking raylib statically but then building raygui as a DLL? That seems weird and makes the directions incomplete.
The steps below worked for me. I had to add some options to the gcc command so it could link to raylib.dll in the other source directory.
Build raylib.dll from source
git clone https://github.com/raysan5/raylib raysan5\raylib cd raysan5\raylib\src mingw32-make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED
Build raygui.dll from source
git clone https://github.com/raysan5/raygui raysan5\raygui cd raysan5\raygui\src copy raygui.h raygui.c gcc -shared -o raygui.dll raygui.c -I../../raylib/src -L../../raylib/src -DRAYGUI_IMPLEMENTATION -DBUILD_LIBTYPE_SHARED -static-libgcc -lopengl32 -lgdi32 -lwinmm -lraylib -Wl,--out-implib,librayguidll.a
-Greg