Re: HELP RayGui DLL
- Posted by andreasWagner 2 days ago
- 73 views
Hello,
Until yesterday evening, I was unable to create a working raygui.dll.
Then it worked.And you only need one dll.
(raylib and raygui in one dll)
I tried it with your wrapper for Euphoria 64-bit and 32-bit.
Because I had to spend a long time figuring it out, I wrote it down.
Maybe it will save others some time.
I wasted endless time with tdm-gcc. But all my DLLs died with signal 11 or didn't export any functions at all.
I then started completely from scratch:
First, I removed TDM-GCC (from %PATH%).
Then I installed w64devkit.
https://github.com/skeeto/w64devkit/releases/download/v2.5.0/w64devkit-x86-2.5.0.7z.exe for 32-bit
https://github.com/skeeto/w64devkit/releases/download/v2.5.0/w64devkit-x64-2.5.0.7z.exe for 64-bit
Simply unzipped each one into its own directory using 7zip (7zip can unzip the exe directly, rename it beforehand if necessary (remove .exe)).
w64devkit comes with its own shell (start w64devkit.exe).
Then fetch the current Raylib/raygui sources from GitHub and copy them into a directory structure like this:
./raylib_source
|
|-- raylib
|
|-- raygui
Then edit this Makefile:
./raylib_source
|
|-- raylib/src/Makefile
|
|-- raygui
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll) RAYLIB_LIBTYPE ?= SHARED. # Include raylib modules on compilation # NOTE: Some programs like tools could not require those modules RAYLIB_MODULE_AUDIO ?= TRUE RAYLIB_MODULE_MODELS ?= TRUE RAYLIB_MODULE_RAYGUI ?= TRUE
If you stick to the directory structure specified above, these are the only adjustments you need to make.
A simple make in raylib/src will then generate a raylib.dll with integrated raygui. you then need to adjust raygui.e and raylib.e to the (eventuelly new filename).
If the following error (or something similar) occurs: (raylib source comes with 64bit rc.data files)
D:/testpool/raylib_new/w64devkit/bin/ld.exe: i386 architecture of input file `./raylib.dll.rc.data' is incompatible with i386:x86-64 output collect2.exe: error: ld returned 1 exit status make: *** [Makefile:782: raylib] Error 1
you must adjust raylib.dll.rc.data accordingly:
for32bit target dll windres raylib.dll.rc -o raylib.dll.rc.data --target=pe-i386 for 64bit target dll windres raylib.dll.rc -o raylib.dll.rc.data --target=pe-x86-64

