PDA

View Full Version : Build qsqlodbc ODBC staticlib not possibel...



patrik08
26th October 2006, 21:24
I must make a simple app to export sql table to XML format.. a simple portable exe file i build qt static only for this small exe... exact by..
http://wiki.qtcentre.org/index.php?title=Building_static_Qt_on_Windows

Now i change the pro file to make the lib.... odbc

Whi... Only sqlite driver is visible?
Waht i must make?
i use qt4.2 & mingw compiler ...



TARGET = qsqlodbc

TEMPLATE =lib
CONFIG += qt warn_off release staticlib
LANGUAGE = C++
#DEFINES -= UNICODE
DEFINES += NDEBUG THREAD_SAFE=1 TEMP_STORE=2


HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h
SOURCES = main.cpp \
../../../sql/drivers/odbc/qsql_odbc.cpp

mac {
!contains( LIBS, .*odbc.* ) {
LIBS *= -liodbc
}
}

unix {
!contains( LIBS, .*odbc.* ) {
LIBS *= -lodbc
}
}

win32 {
!win32-borland:LIBS *= -lodbc32
win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
}

include(../qsqldriverbase.pri)

patrik08
27th October 2006, 07:02
I found ....
http://doc.trolltech.com/4.2/qtplugin.html#Q_IMPORT_PLUGIN

This qt macro allow to export the plugin static....

I tested .. and export the qsqlite plugin static from sqlite running ok...
and qt odbc qsqlodbc no why?

IMO: on qt4.1 i have buildet odbc normal and is running, now on qt4.2 No!