Qt and embedded Firebird DB
-
wrote on 28 Nov 2014, 11:50 last edited by
Hello!
I am having some difficulties to find a tutorial to use Qt with embedded Firebird DB for Mac OSX.
Could anyone help to find how to do that?
Thanks
-
Hi,
AFAIK, it would be pretty much the same steps you would need for e.g. windows. Get the embedded server library and link the plugin to that one rather than the usual client lib.
Hope it helps
-
wrote on 20 Jan 2015, 14:02 last edited by
Thanks for the reply. But how could I link it?
-
wrote on 20 Jan 2015, 18:59 last edited by
I have installed Qt 5.4 and Firebird 2.5 (Mac OS X 64-bit Classic, Superclassic & Embedded - Intel)
The Firebird 2.5 installation creates a firebird.framework at my computer. Now I am trying to make a connection with Qt but I receive a "driver not loaded" message.
Can someone help me please?
-
I'd say the firebird plugin doesn't find your Firebird libraries.
Have a look at the output of otool -L on the Qt Firebird plugin to see what it's currently missing
-
wrote on 21 Jan 2015, 19:08 last edited by
I am not figuring out how to link the plugin with Qt. How can I do that?
-
You don't link plugins, they are loaded at runtime and yours is probably not finding the Firebird library. Hence the check with otool
-
wrote on 22 Jan 2015, 19:22 last edited by
Solved
Tutorial above:
TUTORIAL: CREATING FIREBIRD PLUGIN FOR MAC OSX WITH QT
QT 5.4.0
FIREBIRD 2.5 (Mac OS X 64-bit Classic, SuperClassic & Embedded - Intel)1 - Install Qt
2 - Install Firebird
Firebird will be installed as a Framework at /Library/Frameworks/Firebird.framework3 - Open the file qsql_ibase.pri
File found in:
$ QTDIR / Src / qtbase / src / sql / drivers / ibase /4 - Leave only lines 1 and 2
ex:
HEADERS + = $$ PWD / qsql_ibase_p.h
SOURCES + = $$ PWD / qsql_ibase.cpp5 - In the terminal go to the folder:
$ QTDIR / Src / qtbase / src / plugins / sqldrivers / ibase /6 - Run the command:
$ QTDIR / clang_64 / bin / qmake -spec macx-g ++ -o Makefile "IncludePath + = / Library / Frameworks / Firebird.framework / Versions / Current / Headers" "LIBS + = - L / Library / Frameworks / Firebird.framework / Versions / Current / Libraries -lfbclient "ibase.pro7 - In the same folder run the Make command
8 - In the folder:
$ QTDIR / Src / qtbase / plugins / sqldrivers /
Two files are created:
libqsqlibase_debug.dylib
libqsqlibase.dylib9 - Copy these two files to the folder:
$ QTDIR / clang_64 / plugins / sqldrivers / -
wrote on 22 Jan 2015, 19:22 last edited by
Thanks for all replies
-
wrote on 29 Jan 2015, 17:33 last edited by
Well, I created the driver, but how do I now to make it embedded?
-
Do you mean embed in the application bundle ?
-
wrote on 30 Jan 2015, 16:46 last edited by
Yes. With all functionalities inside the app bundle.
-
It should be deployed automatically when calling macdeployqt