PDA

View Full Version : configure qt, static build



terhje
11th February 2012, 22:02
Hi,
Im working on deploying my application statically. Im using SQLserver so i need to add the sql drivers im using(QODBC).

this is what i ran in the qt command prompt:
configure -platform win32-g++ -static -release -no-exceptions -qt-sql-odbc -qt-libjpeg

compiling and running the program with this build:
the exe file gets around 10mb and starts up fine. But i get a message that it cant connect to the database because the driver is not loaded. any ideas what i need to do?

question 2: When somethings dont work and i want to run configure again. Do i need to run "mingw32-make confclean"?

thx, Terje


Detaile description on what i've done:
1: win32-g++ qmake file: changed the line qmake_lflags to:
QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc

2.QT command prompt: configure -platform win32-g++ -static -release -no-exceptions -qt-sql-odbc -qt-libjpeg

3.QT command prompt: wingw32-make

4. project file name.pro: added CONFIG += static

5. compiled and ran.

terhje
12th February 2012, 00:45
i ran the configure /?
the picture says that only sqlite is available on this system. do i need to download the driver for odbc manually? it works fine with the odbc(in qt) before i did the -static build.
7398

terhje
16th February 2012, 18:49
help please