Forum > Database
Typhoon relational database
Zvoni:
Again reminding the OP: Use Ctypes for the bindings!
You might get lucky that the native Pascal-Types are correct for your intended Target, another User trying to use it for a different target might start a nuclear rocket in North Korea
funlw65:
--- Quote from: Zvoni on February 03, 2022, 08:45:51 am ---Again reminding the OP: Use Ctypes for the bindings!
You might get lucky that the native Pascal-Types are correct for your intended Target, another User trying to use it for a different target might start a nuclear rocket in North Korea
--- End quote ---
Hi Zvoni,
I have yet to learn what and how to do that :( ... I said I am not skilled in this. If I awakened some interest in typhoon database, then than would be an accomplished goal...
Zvoni:
https://wiki.freepascal.org/Creating_bindings_for_C_libraries#Manual_conversion_of_C_headers_to_Pascal
--- Quote ---Note that one should use the ctypes unit together with the types that it declares to convert C headers instead of trying to use the basic Pascal types directly. This ensures that the bindings are correct in all platforms, as the C types might have different sizes on different architectures and operating systems.
--- End quote ---
funlw65:
--- Quote from: Roland57 on February 03, 2022, 08:33:38 am ---Very interesting. :)
I could compile and run successfully the C demo (with the static lib, on Linux Mageia). Very nice! (By the way, it was very easy to install raylib.)
For the Pascal demo, I have to find how to build libtyphoon.so.
Could you share the binary, or explain how you built it?
--- End quote ---
Hi Roland57,
For the dynamic raylib, this one must include inside also raygui...
You have to clone the GLFW project from github and compile and install it as a shared library - it gives you a link to their home page for the compiling instructions. Follow them.
After that, get the raylib 4 release, unzip it and go to the src subfolder and edit the Makefile.
There, you have to activate using the external GLFW, activate the shared compilation and the inclusion of the raygui... can't remember now if there are more, but all you need is there in the Makefile. I think this is also something that Gunko must resolve/explain for use of its distro of Ray4Laz...
For the dynamic typhoon. Just execute configure to obtain the Makefile file and edit it to include the -fPIC option in CFLAGS vatiable (I included it after -shared option which must be included as well) . Then, after compilation, execute the following command:
--- Code: Bash [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---gcc -shared -o libtyphoon.so ansi.o bt_del.o bt_funcs.o bt_io.o bt_open.o cmpfuncs.o os.o readdbd.o record.o sequence.o ty_auxfn.o ty_find.o ty_ins.o ty_io.o ty_log.o ty_open.o ty_refin.o ty_repl.o ty_util.o unix.o vlr.o
How looks CFLAGS in my Makefile:
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---CFLAGS = -g -Wall -shared -fPIC -Wstrict-prototypes -Wmissing-prototypes -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE $(DEFINES)
funlw65:
--- Quote from: Zvoni on February 03, 2022, 04:06:46 pm ---https://wiki.freepascal.org/Creating_bindings_for_C_libraries#Manual_conversion_of_C_headers_to_Pascal
--- Quote ---Note that one should use the ctypes unit together with the types that it declares to convert C headers instead of trying to use the basic Pascal types directly. This ensures that the bindings are correct in all platforms, as the C types might have different sizes on different architectures and operating systems.
--- End quote ---
--- End quote ---
Thank you Zvoni, I will look into it and redo the header...
Navigation
[0] Message Index
[#] Next page
[*] Previous page