-
Notifications
You must be signed in to change notification settings - Fork 9
Shared object builds #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
i'm not familiar with building raylib dll on windows, i use linux, while testing everything i used official precompiled so/dll, for testing it on windows i prebuild test binary on linux and then i used wine and windows wm to test it
its just a binding so official raylib documentation should works just fine, but for working with fbc i wrote simple game using raylib and fb here is the build script i used, again it is written under linux so i would recommend using it as a example
sure, link is fine and thanks
no problem, i'm not present on fb forum anyway, and sorry for replying so late but github didn't show me this issue, no ping on app nor website |
Thanks for the reply
or
I had a peek at that and will likely use it as a check for my own examples if I get stuck :) I am using both Windows and Ubuntu and attempting to create both raylib and raygui examples in C, FB and Py3 on both platforms, so I have set myself a bit of a challenge X-) I will let you know how it goes when I get to the FB examples and give some feedback for you :) P.S. Don't stress about being in any hurry to reply, I'll be working on this for ages yet :) |
i did some testing and i couldn't get raygui.bi to work with raylib compiled with RAYLIB_MODULE_RAYGUI=TRUE but i it worked when i compiled raygui separately and added [ #inclib "raygui" ] to raygui.bi file, i will add some informations to README file on how to get raylib.bi and raygui.bi to work |
Hi WIITD I just got through the basic Windows tests for FB_Raylib and raygui. Build_raylib.cmd
Move all compiled library files to the respective FBC directories. I am using FBIde and the Settings FreeBASIC tab does not appear to correctly locate the raylib library files if I place them in FBC \bin, \inc or \lib Changing the compiler command to The example from one of the github V3,5 binders "shapes_basic_shapes.bas" worked without issue.
The raygui_controls_test_suite.bas from the same git repository is for raylib V2.8 I think.
The rest is just correcting the API changes. I have "roughly" done most but 3 or 4 controls I am still working out. Have a go with it if you want :) |
P.S. I am just attempting to get the 3 development environments up with examples compiling in C, FB and Py3 atm. Seeing that I have the dev environment and a 2 basic example working, I will do the same on Lubuntu and see if the partial gui controls example compiles. |
You can ignore this if you wish. I left it here in case you encountered the directory naming issue I describe at the end. I placed a DEBUG print of the variable "RAYLIB_MODULE_RAYGUI_PATH" at Line 682:
terminal output
I am completely lost as to where this variable (../src/../../raygui/src/raygui.h) is coming from when it should be ../src/raygui.h I am not sure if this is the same that you encountered when attempting RAYLIB_MODULE_RAYGUI=TRUE RAYLIB_LIBTYPE=SHARED? I am going to go back and compare this with the V4.0.0 MakeFile which worked previously and may even use the previous V4.0.0 MakeFile as a test. OK, Linux is weird. I was compiling from the downloaded source (raylib-4.2.0.tar.gz + raygui-3.2.tar.gz) in a sub directory /home/User/Documents/ And the build failed. I just downloaded both raylib and raygui via make PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE RAYLIB_LIBTYPE=STATIC GRAPHICS=GRAPHICS_API_OPENGL_21 I had some confusion and issues building raylib previously with differences between the git clone and the source release, so maybe the git repository is OK and the raylib-4.2.0.tar.gz is damaged... or some other weird file permission or path issue that I haven't discovered yet. Sorry for crowding you Issues thread. I thought I had this nailed :( I had to rename raygui-3.2 to raylib and raylib-4.2.0 to raygui and everything compiled fine without change. |
Confirmation of shapes_basic_shapes.bas and modified raygui_controls_test_suite.bas /home/Username/raylib /home/Username/raygui make PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE RAYLIB_LIBTYPE=SHARED GRAPHICS=GRAPHICS_API_OPENGL_21 sudo make install RAYLIB_LIBTYPE=SHARED # Dynamic shared version. Check file permissions for raylib.bi etc RW R R All good :)
|
Hi @WIITD
I was creating the FB bindings for V4.2 in the background but you beat me too it :) As such I am content to run with the work you have done. I have intentions of including raylib and raygui in some books I am writing on introduction to programming with examples in C, FreeBASIC and Python 3. I intend to use raylib/raygui for all 3 languages to exemplify basic graphics (graphics.h like) and GUIs.
Documentation for using raylib in FB is a little scant so I would like to confirm with you the C builds of the shared library you are creating for Windows and Linux (Ubuntu). I am currently building the shared library with "winlibs-mingw-w64-x86_64-9.3.0-7.0.0-r3-sjlj.7z" on windows, but haven't got to the Linux side just yet.
As this is a 64 bit build I am first rebuilding the default 32bit "raylib.dll.rc.data" as 64 bit.
@ECHO OFF
REM Recompile the Resource data file for 64 bit.
REM The library default is 32 bit.
REM Pleas set the paths according to the compiler and source directory.
SET PATH=%PATH%;SET PATH=%PATH%;C:\Dev-FreeBASIC\Winlibs\winlibs-mingw-w64-x86_64-9.3.0-7.0.0-r3-sjlj\mingw64\bin
SET PATH=%PATH%;C:\Dev-FreeBASIC\Winlibs\winlibs-mingw-w64-x86_64-9.3.0-7.0.0-r3-sjlj\raylib\src
windres raylib.dll.rc -o raylib.dll.rc.data --target=pe-x86-64
pause
I am then building the raylib4.2 and raygui3.2 into the dll/so with the following switches.
The following also re-compiles the raylib.dll.rc.data after clean...
REM Makefile laucher for 64-bit Compile.
REM Please set the paths according to the compiler and source directory.
SET PATH=%PATH%;SET PATH=%PATH%;C:\Dev-FreeBASIC\Winlibs\winlibs-mingw-w64-x86_64-9.3.0-7.0.0-r3-sjlj\mingw64\bin
SET PATH=%PATH%;C:\Dev-FreeBASIC\Winlibs\raylib-4.0.0\src
REM Recompile the Resource file for Windows x86-64
windres raylib.dll.rc -o raylib.dll.rc.data --target=pe-x86-64
REM Clean up the build environment.
mingw32-make clean
REM Using OpenGL V2.1 for VirtualBox compatibility.
REM mingw32-make V=1 -f Makefile PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE RAYLIB_LIBTYPE=SHARED GRAPHICS=GRAPHICS_API_OPENGL_33
mingw32-make V=1 -f Makefile PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE RAYLIB_LIBTYPE=SHARED GRAPHICS=GRAPHICS_API_OPENGL_21
pause
The shell script for Ubuntu should be much the same.
Can you confirm that this build is what you are using with raylib.bi, raymath.bi and raymath.bi ?
Also, with your permission I would like to offer attribution for your work in the books. Is a link to the github project acceptable to you?
Sorry about dropping this in the issues sections as I am unaware of your username in the FB forums and I don't use twatter :)
Best regards
Axle
The text was updated successfully, but these errors were encountered: