Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Building Qt 4.8.4 with MySQL

$
0
0
I’m trying to build the “Qt Everywhere” Qt 4.8.4 from source (I haven’t ported my app to Qt5 yet, but it’s on my list of things to do for the next release) because I recently built a new computer and my old Qt was lost when I swapped out the hard drives and reinstalled Windows. I thought I had all of my old 4.8.4 environment backed up but I was wrong—I forgot to back up the libraries the Qt environment was linked against so I was quite surprised when my app wouldn’t compile. Here’s what I’m using: 1. Qt-everywhere-opensource-4.8.4 sources 2. MariaDB 5.5 libraries and headers (32 bit). Can Qt be built with MariaDB resources or does it need real MySQL? I know apps built against my old Qt environment ran fine on MariaDB. 3. MinGW 32-bit (not sure what version but it is the latest b/c I downloaded it yesterday) My system specs: 1. Intel Core i5-3470 (quad core, not overclocked) 2. 8 GB Ram 3. 640 GB hard drive (this is my old hard drive that originally had my old Qt environment on it) 4. Windows 7 Home Premium 64-bit I’ve spent most of my weekend trying to compile Qt 4.8.4 again. I managed to do it once last year by following this guide: http://www.rag.com.au/linux/qt4howto.html I recall it involving lots of trial-and-error but I can’t remember all the details of how I did it (I’m beginning to think I just got lucky last time). I’m building MySQL into the main Qt instead of a plugin because that is how I did it last time and it always worked perfectly after I got it built. I already got most of the preliminary stuff ready: I copied my MariaDB headers to “C:\include” and the libraries to “C:\ lib” (I’m trying to keep the paths as simple as possible). I already used Reimp and Dlltool to convert libmysql.lib to libmysql.a (the raw lib file builds fine on Linux but not Windows). The build ran for roughly half an hour until it gave me this error: mingw32-make[2]: Leaving directory 'c:/Qt/qt-everywhere-opensource-src-4.8.4/src /plugins/qmltooling' mingw32-make[1]: Leaving directory 'c:/Qt/qt-everywhere-opensource-src-4.8.4/src /plugins' Makefile:858: recipe for target 'sub-plugins-make_default-ordered' failed mingw32-make: *** [sub-plugins-make_default-ordered] Error 2 I’m not sure what is causing this error (google didn’t tell me anything I didn’t already know). I don’t see any references to MySQL so should I assume the libraries/headers got baked into the Qt properly? Here is how I’ve configured Qt: configure.exe -opensource -platform win32-g++ -debug-and-release -qt-sql-mysql -qt-sql-sqlite -l mysql -I C:\include\mysql -L C:\lib

Viewing all articles
Browse latest Browse all 2113

Trending Articles