Build raylib all with extras as dll? #2557
Replies: 6 comments 10 replies
-
@Axle-Ozz-i-sofT extras are being removed in the upcoming In any case, |
Beta Was this translation helpful? Give feedback.
-
I apologize as I am not familiar with the library as yet and am uncertain what headers are needed. My default was to try and include ALL into a single dll/so so they are all available if needed as I can only use the dynamic library in FreeBASIC. If the easing.h, physac.h and rmem.h are included in raylib.h already then I guess they are not required for anything. Learning raylib + raygui: I will be writing 4 books on programming for students. raylib and raygui is my choice to exemplify the essential graphics programming (graphics.h like such as DSL_BGI.h) with some extra examples that raylib makes available, and raygui to offer some examples of using a GUI widget kit. I will cover other areas in basic such as essential algorithms, Cursers, maybe GNUPlot if I can't do it satisfactorily in raylib, and database such as SQLite. The main focus of this 4 books is on using libraries. |
Beta Was this translation helpful? Give feedback.
-
Sorry about breaking this up as I got an urgent call out. So essentially I just need to build raylib + raygui and any option additional headers as a single shared library. I will then build the FB binders and likely a single BF raylibgui.bi or raylibex.bi to go with the dll/so. Just to keep it all simple for my students and beginners to drop in and get started with any of the examples in my books.
Last, How far away on the V4.2 and will the changes (extras are being removed in the upcoming raylib 4.2) make much difference to the API from 4.0.0? I may hold off on building the FB headers until the new version. If it's just small API changes I can alter the V4.0.0 raylib.bi to add the changes and get a start on the binders straight away. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi raysan
I am a little confused here. Does this mean that easings.h, physac.h and rmem.h are deprecated, or do you intend to write them into raylib V4.2.x? My goal is to include and compile all headers to a single shared library as a dll or so for Linux so that I can use it with FB. I have only written a handful of dlls and from a single header so I am stumbling in the dark a little at the moment with how to include the extra headers. I'll read through the provided makefile again and also I took some note previously from the NP++ npes_saved.txt and see if I can nut it out. I am expecting to see __declspec(dllexport) and extern "C" etc in the headers to create a dll/so. Maybe it's somewhere in the makefile to add the extra code with the precompiler, or the above std dll constructions is not required, which sounds odd. Axle |
Beta Was this translation helpful? Give feedback.
-
Hi raysan I have tried adding the extra headers into the .\src\Makefile and compiling as a dll but I am having issues even with the default Makefile as it cannot find raygui.c or physac.c
echo #include "../src/extras/raygui.h" >> raygui.c gcc -c raygui.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -s -O1 - Looking at:
NOTE: raygui header should be distributed with raylib.hraygui.o : raygui.c I expect that we are converting raygui.h to (>>) raygui.c but I can't where raygui.c is first declared or created. |
Beta Was this translation helpful? Give feedback.
-
Hi raysan5 Moving the files to the raylib source seams to have got around the issue and the raygui and physac function definitions/exports are available in libraylibdll.a and raylib.dll So, I can compile raylib, raygui and pyhsac to a dll under Win GCC. Success Just have to repeat that on Ubuntu now. Maybe i'll just kick off with raylib and raygui as a dll/so and do the FB binders and have a look at physac later on and see what the new version 4.2 comes up like (At least I know I can get it to compile now with some band-aids lol). Thanks for the help so far :) Axle |
Beta Was this translation helpful? Give feedback.
-
Hi raysan5 and all
Is it possible to build the entire library v4.0.0 including extras as well as raygui v3.x.x to a single .dll and .so?
If so what compile switches are required (I am using the std makefile/32)?
https://github.com/raysan5/raylib/wiki/CMake-Build-Options
I am sure I seen instructions to be able to include ".\extras" (which included an older version of raygui) as a single dll/so but can't find the file/reference again.
Reason:
I want to create the binders for FreeBASIC. As FB cannot natively compile C headers and needing to recompile the lib.a files in the same C compiler and import a separate static lib for every version of FB to match the C compiler is clunky. If I can build raylib + extras + raygui as a single .dll/.so it will allow it to be used across multiple FB versions.
Regards Axle
Beta Was this translation helpful? Give feedback.
All reactions