Set-up MariaDB library file location programmatically?
-
Is there anything you need from me in terms of information?
This is from the folder:
/usr/local/Cellar/mariadb/10.4.6_1/lib
ls -l:
-rw-r--r-- 1 simonplatten staff 230704 28 Sep 2019 libmariadb.3.dylib lrwxr-xr-x 1 simonplatten staff 18 17 Jun 2019 libmariadb.dylib -> libmariadb.3.dylib -rw-r--r-- 1 simonplatten staff 336264 17 Jun 2019 libmariadbclient.a lrwxr-xr-x 1 simonplatten staff 18 17 Jun 2019 libmysqlclient.a -> libmariadbclient.a lrwxr-xr-x 1 simonplatten staff 18 17 Jun 2019 libmysqlclient.dylib -> libmariadb.3.dylib lrwxr-xr-x 1 simonplatten staff 18 17 Jun 2019 libmysqlclient_r.a -> libmariadbclient.a lrwxr-xr-x 1 simonplatten staff 18 17 Jun 2019 libmysqlclient_r.dylib -> libmariadb.3.dylib -r--r--r-- 1 simonplatten staff 12400 17 Jun 2019 libmysqlservices.a drwxr-xr-x 3 simonplatten staff 96 28 Sep 2019 pkgconfig drwxr-xr-x 49 simonplatten staff 1568 17 Jun 2019 plugin
-
@jsulm , thank you.
So already I'm struggling with the answer on: https://stackoverflow.com/questions/6483523/qt-how-to-getcompile-mysql-driver
I cannot find the driver sources, my Qt path looks like this:
/Users/simonplatten/qt/5.14.2/Src
There is no plugins folder in there, the only plugins folder is:
/Users/simonplatten/qt/5.14.2/clang_64/plugins
That doesn't contain a mysql folder. I just did:
sudo find / -name sqldrivers/mysql
Nothing was found on my system.
I've tried to follow the instructions on https://doc.qt.io/qt-5/sql-driver.html#qmysql
I fall at the first hurdle, I don't have the environment variable QTDIR set and I think my installation of MariaDB is complicated by the fact it was installed using Homebrew. -
@SPlatten said in Set-up MariaDB library file location programmatically?:
I cannot find the driver sources
Did you install Qt sources?
-
@SPlatten said in Set-up MariaDB library file location programmatically?:
how do I do that?
If you used online installer you can use Maintenance Tool...
-
-
@jsulm , I'm confused now, the link posted is to the Open source page. What if I don't intend my application to be open source, once its completed I intend to purchase a license before distribution. Can I build a mySQL driver for Qt without open source?
-
@SPlatten said in Set-up MariaDB library file location programmatically?:
once its completed I intend to purchase a license before distribution
I'm not sure QtCompany will agree with that.
You should contact them.There are many ways to get the source code. For example here: https://download.qt.io/archive/qt/5.15/5.15.0/single/
Or using Git as described here: https://wiki.qt.io/Get_the_Source -
Hi, it might be easier if you use Qt's ODBC plugin (libqsqlodbc.dylib) together with the MariaDB Connector/ODBC
-
@hskoglund , thank you, I'll look into it. It seems its available for just about every operating system except MAC.
-
@SPlatten I'm not a lawyer and not working for QtCompany (that's why I suggested to ask the company).
You say: you are now developing an app and you want to release it later as closed source. And you want to buy Qt license when you want to release the app. My point was: QtCompany could say that you actually need the commercial license from the beginning as you're developing a closed source application which is going to be distributed. I may be wrong here, but it is worth checking.If you're not going to distribute your app then there is no issue.
-
@jsulm , thank you, I'll send Qt an email. Contacting Qt to ask such a question is easier said than done...How do I contact the appropriate person or department in Qt to ask?
https://www.qt.io/contact-qt-services-team
Query sent to Qt.
-
@SPlatten said in Set-up MariaDB library file location programmatically?:
That doesn't contain a mysql folder. I just did:
sudo find / -name sqldrivers/mysql
Nothing was found on my system.
I realize this is probably not your issue here, but I think you ought be aware, at least for future searches, that
-name abc/def
--- with that/
--- will always return false, so you'll never find a match.On MacOS (I'm Ubuntu) I think you'll find you would have to use
-path
instead, plus you want a substring match, so you would need e.g.:sudo find / -path '*sqldrivers/mysql' -print
P.S.
Don't forget the-print
which you didn't show you used, elsefind
is remarkably silent ;-) -
@jsulm said in Set-up MariaDB library file location programmatically?:
My point was: QtCompany could say that you actually need the commercial license from the beginning as you're developing a closed source application which is going to be distributed. I may be wrong here, but it is worth checking.
You do, or at least the QtC want you to, I had the issue when I wanted to open source a project that was previously made under QtLicence, slightly different but that exact topic came up.
It's due to the yearly licensing
scamscheme, would be no issue at all if it was a one purchase last for ever kind of deal