PDA

View Full Version : static linking options



jcr
6th October 2006, 22:14
Hello,

When installing Qt 4.2, it is possible to build statically by typing
./configure -static

I understand that I should build the database drivers, for instance with -qt-sql<psql>
At this point, I can be sure 100% that an app deployed with no extra postgresql library will run properly. Just checking in case I missed something here.

I also need to build some image support.
-qt-libmng will do the trick and I will not have to bundle any png library and the machine where the app is deployed will not need to have the png library. Once again, I am checking to make sure I got it right.
-system-libpng will use the library of the OS; I am assuming the library of the machine where compilation occurs; which means that I should be careful to ship that library, just in case.

Thanks

jcr
7th October 2006, 16:07
I followed the wiki's instructions to build statically
configure - static works fine

but

configure -release -static -qt-zlib -qt-gif -qt-libpng -qt-libjpeg -qt-libmng -no-qt3support -qt-sql-psql -I C:\psql\8.1\include -l C:\psql\8.1\lib\ms\libpq.lib

returns an error
"qmake.exe has encountered a problem and needs to close..."
QMake failed, return code -1073741819
Any idea of what I am doing wrong?
Thanks

jacek
7th October 2006, 16:12
configure ... -l C:\psql\8.1\lib\ms\libpq.lib
Try: configure ... -L C:\psql\8.1\lib\ms\

jcr
7th October 2006, 16:32
Jacek, I don't know how many issues you have solved for me... thank you very much to you and to everybody else qtcenter for that matter.

jcr
7th October 2006, 17:12
Well, another problem popped up here. I am compiling for mingw and I changed the qmake.conf files as suggested on wiki,
then typed the above configure
goes fine... I then type mingw32-make
and I get the error:
g++: OBJECTS_DIR: no such file or directory
g++: =: No such file or directory
g++: tmp\obj\release_static: No such file or directory
mingw32-make[3]: ***[..\..\..\bin\rcc.exe] Error1
mingw32-make[3]: Leaving directory 'C:/Qt/4.2.0/src/tools/rcc'
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/4.2.0/src/tools/rcc'
mingw32-make[1]: *** [sub-tools_rcc-make_default] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/4.2.0/src'
mingw32-make: *** [sub-src-make_default-ordered] Error 2

I am a bit lost here...