Hi D.J.Peters/Joshy
"Why do you will use a none working static 4.0 version if you can use a working static 3.x version ?"
At this time NO version is working for me. And I have tried with every raylib binder available... Multiple times.
If I can get at least 1 version (V3.5 would be a start as the binders for the library appear complete) compiling the same version examples, that would be a start.
The biggest difficulties I am encountering appear to be linker errors.
The documentation with regards to correctly using any additional C based library in FB is virtually not existent which makes what should be a simple task exceptionally difficult.
The lack of any documentation with any of the current FB binder headings makes the entire process a guessing game.
FBC ships with a partial support for the older version 3.0 of raylib, but unlike any other libraries shipped with the FBC package there is NO binaries, either static or shared.
I am finding this extremely frustrating
"The rayGui is a header only solution from Haubitze so it should work also:"
raygui relies upon the equivalent raylib version as a dependency to work. It can be used as a stand alone, but you have to create/add the raylib library dependencies your self.
Why version 4.0?
Version 4.0 (raylib + extras) is the most recent and up to date release. V4.0 is what I am using in C and Python on Windows x86-64 and Ubuntu x86-64.
raygu 3.1 is the most recent version used in the same context as above.
I am writing 6 books/guides. "Beginners Guide To Programming - [module]" (Beginner to intermediate).
I have completed the first 2 " - Programming and Coding Overview" and "- Development Environment Overview"
Both currently in a final draft release with one of our tertiary training institutes in Australia for peer review and feedback so that I can make correction before release.
The books are "Programming" orientated as opposed to being language orientated. To offer programming and coding examples and keep the language independence I chose to offer ALL examples in C, FreeBASIC and Pyhthon 3. All examples are cross platform with a focus on Windows x86-64 and Ubuntu(flavours). All example will read (almost)exactly the same, side by side, line for line between the 3 languages except for the basic keyword/syntax differences. This allows the reader to focus on the common constructs(Flow, Logic, Methodology etc.) of all 3 languages keeping the focus on "programming" as opposed to "Language specific coding".
Why these 3 languages?
After much research, time, effort and past experience; C, FB and Py came up as the best "Natural" match. Python 3 is currently the most popular used language and the most common used in many educational environments. I am a bit of a C language proponent as most SOCs and SBCs (IoT) are heavily grounded in C based firmware. Python is heavily influence by C and BASIC. I usually write and test the examples for all 3 languages side by side at the same time, although I tend to use C as the test base and translate to FB and Python from the C source. Interestingly FB translates almost line for line to Python.
The final 4 books will introduce the use of Libraries and "intermediate" programming methods. One booklet will cover the description of libraries as well as there correct installation, use in development and transport the library runtime with a project release. The final 3 books will each be more language specific, but all code examples must to be able to be read side by side in a "Rosetta Stone" fashion and all use the same libraries and versions. I will introduce Command line programming with "Curses", Simple BGI style graphics with "raylib", data ploting either with raylib or "GNUPlot", GUI and basic common controls with "raygui", Audio with "raylib" (aka miniaudio), Video MM still to be decided (VLC, MPV, ffmpeg); but I may just pull it down (in size and complexity) to a simple MPEG-/2 using PL_MPEG; and cover Simple database use with flat file CSV and SQLite.
I have made FB somewhat central to these books and guides. Raylib/raygui is the simple lightweight choice for graphics and GUI basics. raylibv4.0 and rayguiv3.1 are working well on C and Python. I thought using raylib/raygui in FB would be a straight forward exercise like C and python seeing that it has supposedly been included in the FBC set for some time (raylibv3.0) but this turns out to not be the case.
If I can find or be pointed to the correct documentation on installing and using C libraries and FB bindings in FBC then it shouldn't be a difficult task (I would think), but I can't even find a basic outline on the correct locations to place a library in FB (header, binary static-shared). Most languages will recognize a library from the project folder, along side of the standar library for the language, or basically anywhere in the system path environment. In C we also need to set the location of some libraries for the linker.
I have searched the documentation for FB, searched the forum, asked, and still have no official or correct information with regards to the above.
Compiling raylib/extras and raygui is not difficult in C and although sprinkled around various makefiles and descriptions in the raysan5 wiki.
Suggestion of using msvc binaries in linking with a GCC based compiler (FBC) make me shake my head. Yes, I know that you can do it with some pointer and memory allocation trickery using "Explicit Runtime linking" to the dll, but its not a good practice and fraught with dangers when asking a green student to do it.
I ran up a few versions of raylib/raygui headers with fbfrog to peruse and there is likely enough information
https://documentation.help/FreeBASIC/Tu ... WithC.html to do the conversion for raylibv4.0 myself if I see an early version of the library working correctly in FB. I am quite familiar with writing C libraries static and shared, and I have been coding in BASIC since I was 12 (40 years) so I am sure I can work it out as long as I have correct documentation/information to begin with
C and BASIC dialects are my native tongue, but I am familiar with and will code in some 50 different languages if needed.
I searched the help docs and forums on linking these raylib headers in case that was the issue, except I can't find any "Non-Ambiguous" documents or references on linking in FBC. Generaly libraries will contain essential information such as version, license, compiling options, linking etc. Most of the converted raylib.bi shared around FB and the net have no documentation or required information. (As a note; I have noticed that some don't even contain the essential licence references required by Ramon Santamaria.)
In the end I am sure all of the above will come to have an indirect benefit on the FreeBASIC support base and users once the books are released into the public space.
So, my current challenge/s is/are:
1. Getting a complete and working copy of raylib/raygui compiling from the version examples on FBC Windows x86-64, and FBC Ubuntu x86-64. I will accept any working version including both libraries to start with. raylib and raygui are designed to be used with static linking in C, but due to OOP memory pointer allocation differences I will be happy to run with Implicit Load-Time Dynamic Linking for the moment. I will work out the static linking when I create the version 4.0 bindings.
2. Create the raylib v4.0 bindings as well as the raygui 3.1 bindings.
3. Complete the 3 books with raylib/raygui working correctly in FB, as well as providing the correct instructions for the readers to set up and use the library in FBC.
I will be greatful for any "Genuine and Correct" support documents that you can list to aid me in this task.
Axle