[Qt] How to compile qt bindings

Johan Kotze jkotze at novell.com
Thu Dec 1 13:23:49 CET 2011


Zeljko 

It seems to be an openSuSE issue then. I don't have qmake-qt4, just qmake 2.1. It does not seem to work. I'll ask on the openSuSE forums. 

Thanx for you help. 

Johan

>>> On 12/01/2011 at 14:14, in message <201112011314.32633.zeljko at holobit.net>, zeljko <zeljko at holobit.net> wrote:


On Thursday 01 of December 2011 12:37:08 Johan Kotze wrote: 
> Zeljko 
> 
> There are some really terse instructions in the README.txt file that is 
> included in the source, but as I said in my original post, the 
> instructions do not work. Below is the instructions: 


Have you installed qt-devel packages ? 


I've just tried to make exactly as it is in README.txt and it works (Fedora 14 32bit and Fedora 16 64bit). you need qt-devel and qtwebkit-devel (or whatever name it is under suse) ... package which contains header files of qt (usually installed in /usr/include). 
This is how I've installed those 2 packages on FC16 64bit (which automagically installed also it's dependencies). 
yum install qt-devel.x86_64 qtwebkit-devel.x86_64 


Also, one note: Fedora 16 distributes qt-4.8 , not stable qt-4.7.4, but it works fine. 




[linda at houston qt4pas-V2.4_Qt4.5.3]$ qmake-qt4 -query 
QT_INSTALL_PREFIX:/usr/lib/qt4 
QT_INSTALL_DATA:/usr/lib/qt4 
QT_INSTALL_DOCS:/usr/share/doc/qt4 
QT_INSTALL_HEADERS:/usr/include 
QT_INSTALL_LIBS:/usr/lib 
QT_INSTALL_BINS:/usr/lib/qt4/bin 
QT_INSTALL_PLUGINS:/usr/lib/qt4/plugins 
QT_INSTALL_IMPORTS:/usr/lib/qt4/imports 
QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations 
QT_INSTALL_CONFIGURATION:/etc 
QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples 
QT_INSTALL_DEMOS:/usr/lib/qt4/demos 
QMAKE_MKSPECS:/usr/lib/qt4/mkspecs 
QMAKE_VERSION:2.01a 
QT_VERSION:4.7.4 
[linda at houston qt4pas-V2.4_Qt4.5.3]$ qmake-qt4 
Project MESSAGE: Added -mstackrealign to CXXFLAGS in support of SSE on arch: i686 
Project MESSAGE: Note: This binding version was generated for Qt 4.5.3. Current Qt is 4.7.4 
Project MESSAGE: Qt documents binary compatibility in each Version Change Note: http://qt.nokia.com/developer/changes 
Project MESSAGE: Pascal Qt Interface for binding platform: BINUX 
Project MESSAGE: Install location: /usr/lib 
[linda at houston qt4pas-V2.4_Qt4.5.3]$ make 
g++ -c -pipe -mstackrealign -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -w -D_REENTRANT -fPIC -DBINUX -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtWebKit -I/usr/include -Itmp -o tmp/qt4pas.o src/qt4pas.cpp 
/usr/lib/qt4/bin/moc -DBINUX -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtWebKit -I/usr/include -Itmp src/qobject_hook.h -o tmp/moc_qobject_hook.cpp 
g++ -c -pipe -mstackrealign -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -w -D_REENTRANT -fPIC -DBINUX -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtWebKit -I/usr/include -Itmp -o tmp/moc_qobject_hook.o tmp/moc_qobject_hook.cpp 
.....etc etc ... bindings builded fine. 


> 
> Compile Pascal Qt Interface from source: 
> ======================================== 
> * Download and unpack the sources 
> * cd into the soures directory 
> * run qmake -query to inspect your Qt installation 
> * qmake (creates Makefile) 
> * make (compiles) 
> * make install (obtain super user rights with sudo or su) 
> * make clean (cleans directory, do this when switching Qt versions) 
> 
> I am stuck at the qmake (creates Makefile) part as qmake does not do 
> anything. It just displays the usage screen. I assume you need to give it 
> some kind of parameters, but I don't know what. 
> 
> Johan 
> 
> >>> On 12/01/2011 at 13:28, in message <201112011228.42089.zeljko at holobit.net>, zeljko <zeljko at holobit.net> wrote: 
> On Thursday 01 of December 2011 12:02:38 Johan Kotze wrote: 
> > Zeljko 
> > 
> > I have downloaded the binaries from Den's page and tried both v2.4 and 
> > v2.1 and both crash with the same error. So I am hoping that a locally 
> > compiled version will fix the issue. I am running QT 4.7. I am looking 
> > for more 
> 
> Yes, that's probably true, but keep in mind that your gcc version is 
> important too. 
> 
> > detailed instructions on how to build the library. 
> 
> Afaik detailed instructions are in .txt file when you decompress source of 
> bindings. You need source of qt libs (maybe qt-devel is sufficient but I'm 
> not sure). 
> 
> 
> zeljko 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/qt/attachments/20111201/4085d0e9/attachment-0002.html>


More information about the Qt mailing list