Spoke too soon. make on qt just bombed out looking for -lQtSql4 during the build of uic3. Now when I run qmake on the spinbox example it has -lQtCore4 again. How do I include mysql in a static build of Qt? I was trying -qt-sql-mysql but do I need to use -plugin-sql-mysql instead? I used these options to build Qt this time:
configure.exe -static -fast -qt-sql-mysql -I c:\mysql\include -L c:\mysql\lib\opt -L c:\mysql\lib\debug -l mysql -qt-sql-sqlite
Thanks
mAx
Edit: This link http://www.rag.com.au/linux/qt4howto.html does not use debug when building Qt in static mode. Is that what I am doing wrong? I am going to start compiling now to find out.
Edit 2: That did not work. Arg!
Last edited by maxpower; 16th October 2007 at 18:09. Reason: updated contents
When the make gets to QtXml I can look at its prl file and see -lQtCore4 is included. What am I doing wrong so that Qt keeps wanting to link to a shared Qt lib on a static Qt build??
mAx
I have determined that this only happens when I include mysql in the build. Does this help anyone solve my problem?
mAx
Not really (at least not me)
Maybe write a bug report to qt-bugs
maxpower,
I suffered the same problem as you albeit on 2k. I solved it by doing this:
1. install Qt 4.3.2 as a shared build. (I used c:\qt\4.3.2)
2. copy the installed directory to a new directory (c:\qt\4.3.2-static)
3. add c:\qt\4.3.2-static\lib and c:\qt\4.3.2-static\bin to your path
4. rename c:\qt\4.3.2 to something else so it can't be found. (say c:\qt\old-4.3.2)
5. delete the makefile in c:\qt\4.3.2-static
6. run c:\qt\4.3.2-static\bin\qmake
7. now run configure <---options---> and ming32-make.
8. rename the shared build back to c:\qt\4.3.2
You should with any luck have a working static build and shared build in separate directories.
I didn't suffer these problems under Linux or using QT 4.2.3, only the windows version of QT 4.3.2. The rest of the instructions at http://www.rag.com.au/linux/qt4howto.html worked for me.
I hope this helps,
Regards, B1.
Bookmarks