Assistance with correct install and implimentation of Raylib.gui

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: Assistance with correct install and implimentation of Raylib.gui

Post by Kuan Hsu »

The dependency come from the mingw(gcc) which build the raylib.dll.
Axle
Posts: 67
Joined: May 31, 2022 6:49
Location: Australia

Re: Assistance with correct install and implimentation of Raylib.gui

Post by Axle »

Kuan Hsu wrote: Jun 03, 2022 12:12 ( The pre-compiled libraries were built under gcc-8.1.0 )

Update of information for anyone that reads the quoted.

The raylib library current version 4.0 ships with "gcc version 11.2.0 (GCC)", so I would expect that the pre-compiled binaries have been created in the same gcc v11.2.0.

This doesn't remove the need to compile the raylib.a binaries using the same version gcc as the FBC you intend to use raylib with for static linking.

Axle
Last edited by fxm on Jun 06, 2022 5:02, edited 1 time in total.
Reason: added end quote tag
Axle
Posts: 67
Joined: May 31, 2022 6:49
Location: Australia

Re: Assistance with correct install and implimentation of Raylib.gui

Post by Axle »

Hi Kuan Hsu or D.J.Peters

The Static Library version: (Test 64bit)
(1) Go to raylib github, download release V4.0.0 win64 version, https://github.com/raysan5/raylib/relea ... gw-w64.zip, unzip to a folder( in my case is k:/raylib-4.0.0_win64_mingw-w64 )( The pre-compiled libraries were built under gcc-8.1.0 )
(2) Go to https://github.com/WIITD/raylib-freebasic, Download the zip, in my case, I unzip all *.bi to k:/raylib-4.0.0_win64_mingw-w64/include, then add a new line in raylib.bi:

Code: Select all

#elseif defined(__FB_WIN32__)
    #inclib "opengl32"
    #inclib "gdi32"
    #inclib "winmm"
    #inclib "shell32"     ' <- Add this line
#endif
(3) Download the FBC compiler with the same raylib pre-compiled gcc version toolchain, like FreeBASIC-1.09.0-win64-gcc-8.1.0.7z
(4) Test.bas
(5) "fbc.exe" "G:/CodingPark/MyCode/FB/rayTest/Test.bas" -i "K:/raylib-4.0.0_win64_mingw-w64/include" -p "K:/raylib-4.0.0_win64_mingw-w64/lib"
(6) Run Test (without dll )

Keypoint: The same gcc version
[/quote]

After building raylib static version under winlibs-mingw-w64-x86_64-9.3.0-7.0.0-r3-sjlj and including raylib.a in the lib path I am getting consistent linker errors suggesting that ld.exe cannot find libgcc or libwinpthreads.

Code: Select all

C:\Dev-FreeBASIC\FreeBASIC-1.09.0-win64\bin\win64\ld.exe: C:\Dev-FreeBASIC\FreeBASIC-1.09.0-win64\lib\win64/libgcc_eh.a(
emutls.o): in function `__gthread_key_create':
R:\winlibs64-sjlj-9.3.0\gcc-9.3.0\x86_64-w64-mingw32\libgcc/./gthr-default.h:708: undefined reference to `pthread_key_cr
eate'

Code: Select all

C:\Dev-FreeBASIC\FreeBASIC-1.09.0-win64\bin\win64\ld.exe: R:\winlibs64-sjlj-9.3.0\gcc-9.3.0\x86_64-w64-mingw32\libgcc/./
gthr-default.h:726: undefined reference to `pthread_setspecific'
(Still attempting to compile raygui_controls_test_suite.bas with static raylib)
Any thoughts on what I am missing here?
Axle
Post Reply