Hello friends.
In the latest versions of Free BASIC I no longer find the mysql.bi file in the "include" folder, I wanted to know if I have to migrate all my codes to sqlite or is there another reason.
I am currently using the .bi file taken from an old version and it is not showing incompatibility with the new MySQL C libraries, but I would like to know more information about it, so that if I start a new project or if I have to update an old one I know what choices undertake.
Thank you all.
SOLVED: Missing MYSQL Header in the package
SOLVED: Missing MYSQL Header in the package
Last edited by exagonx on Mar 27, 2024 23:23, edited 1 time in total.
Re: Missing MYSQL Header in the package
The MySQL binding hasn't been updated for a very long time (>10 years) and isn't compatible with 64-bit systems yet.
However, I've added MariaDB bindings a few years ago, which should work in most situations as drop-in replacement for MySQL.
see https://freebasic.net/forum/viewtopic.p ... 80#p293580
The mariadb have been integrated into the official fbc repo meanwhile:
https://github.com/freebasic/fbc/blob/m ... mariadb.bi
In your code #include "mariadb.bi" instead of mysql.
However, I've added MariaDB bindings a few years ago, which should work in most situations as drop-in replacement for MySQL.
see https://freebasic.net/forum/viewtopic.p ... 80#p293580
The mariadb have been integrated into the official fbc repo meanwhile:
https://github.com/freebasic/fbc/blob/m ... mariadb.bi
In your code #include "mariadb.bi" instead of mysql.
Re: Missing MYSQL Header in the package
Thanks for your reply and clarification, I was currently using "mysql.bi" in the 64 bit version of Linux and Windows and they are working perfectly with the 64 libraries (Connector for C) provided by the Oracle site.St_W wrote: ↑Mar 27, 2024 14:58 The MySQL binding hasn't been updated for a very long time (>10 years) and isn't compatible with 64-bit systems yet.
However, I've added MariaDB bindings a few years ago, which should work in most situations as drop-in replacement for MySQL.
see https://freebasic.net/forum/viewtopic.p ... 80#p293580
The mariadb have been integrated into the official fbc repo meanwhile:
https://github.com/freebasic/fbc/blob/m ... mariadb.bi
In your code #include "mariadb.bi" instead of mysql.
In any case, taking your suggestion into account and to avoid future problems, I will start migrating to the libraries and connector for mariadb
Re: Missing MYSQL Header in the package
Interesting. The mysql bindings have been created at a time when a 64-bit version of FreeBasic didn't exist yet, it's surprising that they work. They were added to the "doesn't support 64-bit yet" list about 10 years ago by dkl: https://github.com/freebasic/fbc/commit ... 3800d6aa59 , not sure why, though. Maybe they just have never been checked/reviewed for 64-bit compatibility since then (opposed to many other libraries, which have been removed from the list since then).
You can still find the old headers in the repo, btw:
https://github.com/freebasic/fbc/tree/master/inc/mysql
They are just excluded from most binary packages.