QtCreator?


pmprog

DNF (Did Not Finish)
Joined
Apr 25, 2011
Messages
4,150
I've been working on FreeCell using QtCreator on Windows. My plan is to do a cross compile. I installed QtCreator on sebt3's VM, and I see there's a section to add an additional Qt SDKs. I could only find a qmake2 file in the /usr/local/angstrom folders, but it didn't seem to work.


Does anybody know if it's possible to use QtCreator to compile using the angstrom toolchain?
 
Hmmm, when I do setprj and pndqmake, it tells me invalid option "QT:sm" or something - I think this is back to the session manager bug; Which is I think why I ended up building KeePassX on my Pandora.


Are there any updates to your VM? Sorry, I'm still not really up to speed on Linux
 
Does your code depend on QT4.7 features ?


The pandora have qt 4.6, while qt creator is for 4.7. My toolchain is setuped for 4.6, I can help you to setup it for qt 4.7 (using my qt4.7 build)
 
Judging by http://doc.qt.nokia.com/4.7-snapshot/qt4-7-intro.html, no, I don't use anything 4.7 specific


Interestingly, if I use the build from QtCreator, it looks like it's already using your Qt

Running build steps for project Src...


Starting: "/usr/bin/make" clean -w


make: Entering directory `/home/devel/Pandora/FreeCell/Src'


rm -f qrc_gfx.cpp


rm -f main.o menu.o cardlib.o freecell.o qrc_gfx.o


rm -f *~ core *.core


make: Leaving directory `/home/devel/Pandora/FreeCell/Src'


The process "/usr/bin/make" exited normally.


Starting: "/usr/bin/qmake-qt4" /home/devel/Pandora/FreeCell/Src/Src.pro -r CONFIG+=debug -spec /usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++


Project MESSAGE: Warning: unknown QT: sm


The process "/usr/bin/qmake-qt4" exited normally.


Starting: "/usr/bin/make" -w


make: Entering directory `/home/devel/Pandora/FreeCell/Src'


g++ -c -pipe -Wall -W -D_REENTRANT -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_GL_NO_SCISSOR_TEST -DQT_SESSIONMANAGER -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++ -I. -I//usr/include/qt4/QtCore -I//usr/include/qt4/QtGui -I//usr/include/qt4 -I. -I//usr/include -o main.o main.cpp


In file included from main.h:7,


from main.cpp:1:


menu.h:11: warning: extra tokens at end of #ifndef directive


g++ -c -pipe -Wall -W -D_REENTRANT -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_GL_NO_SCISSOR_TEST -DQT_SESSIONMANAGER -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++ -I. -I//usr/include/qt4/QtCore -I//usr/include/qt4/QtGui -I//usr/include/qt4 -I. -I//usr/include -o menu.o menu.cpp


In file included from menu.cpp:1:


menu.h:11: warning: extra tokens at end of #ifndef directive


menu.cpp:31: warning: unused parameter ‘option’


menu.cpp:31: warning: unused parameter ‘widget’


menu.cpp:107: warning: unused parameter ‘event’


menu.cpp:112: warning: unused parameter ‘event’


g++ -c -pipe -Wall -W -D_REENTRANT -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_GL_NO_SCISSOR_TEST -DQT_SESSIONMANAGER -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++ -I. -I//usr/include/qt4/QtCore -I//usr/include/qt4/QtGui -I//usr/include/qt4 -I. -I//usr/include -o cardlib.o cardlib.cpp


g++ -c -pipe -Wall -W -D_REENTRANT -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_GL_NO_SCISSOR_TEST -DQT_SESSIONMANAGER -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++ -I. -I//usr/include/qt4/QtCore -I//usr/include/qt4/QtGui -I//usr/include/qt4 -I. -I//usr/include -o freecell.o freecell.cpp


freecell.cpp:34: warning: unused parameter ‘option’


freecell.cpp:34: warning: unused parameter ‘widget’


freecell.cpp:247: warning: unused parameter ‘event’


/usr/bin/rcc -name gfx gfx.qrc -o qrc_gfx.cpp


g++ -c -pipe -Wall -W -D_REENTRANT -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_GL_NO_SCISSOR_TEST -DQT_SESSIONMANAGER -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++ -I. -I//usr/include/qt4/QtCore -I//usr/include/qt4/QtGui -I//usr/include/qt4 -I. -I//usr/include -o qrc_gfx.o qrc_gfx.cpp


g++ -o Src main.o menu.o cardlib.o freecell.o qrc_gfx.o -L//usr/lib -lQtGui -lQtCore -lpthread


make: Leaving directory `/home/devel/Pandora/FreeCell/Src'


The process "/usr/bin/make" exited normally.


Interestingly enough, if I hit the debug option (F5), it loads and plays in the VM?! Compiles and runs in Windows too
 
"-I/usr/local/angstrom/arm/share/qt4/mkspecs/linux-pandora-g++ -I. -I//usr/include/qt4/QtCore ..."


That sound realy bad : mixing pandora specific QT config with your local (thuss not at the same QT version) includes....


I'm interested in your pndqmake&&make logs.
 
Where do you find these logs?


This is all I get when I run

devel@devel-VirtualBox:~/Pandora/FreeCell/Src$ pndqmake


Project MESSAGE: Warning: unknown QT: sm


One of the things I don't get (amongst many), is that if I try and alter the paths in the Makefile in the Src folder, when I run pndqmake, it completely overwrites it again. How do I customise the makefile if just rebuilds each time I try to recompile anyway.


My VM hasn't changed much since the one you uploaded (installed Code::Blocks and QtCreator). I've uploaded the project to http://www.pmprog.co.uk/temp/freecell.rar


Once I copied it across, I just did "setprj" and "pndqmake"


If I boot into Freamon's tools on my panda, and go into the Src and qmake, I get

qt_config.prf:7: include(file) requires one argument.


Are these common compile problems? I've never really had as many problems trying to compile code as trying to do getting stuff on the Pandora. I figure I must be doing something wrong, but I have no idea what :(
 
devel@devel-VirtualBox:~/Pandora/FreeCell/Src$ pndqmake


Project MESSAGE: Warning: unknown QT: sm
One of the things I don't get (amongst many), is that if I try and alter the paths in the Makefile in the Src folder, when I run pndqmake, it completely overwrites it again. How do I customise the makefile if just rebuilds each time I try to recompile anyway.
That message is just a warning, you can forget it ;)


And that's a normal behaviour with qmake generated Makefiles : everything depend on the Makefile, so if the Makefile have changed, then everything have to be redone again (including the qmake command, as silly as it look).


The goal here is to make sure you don't modify the Makefile. If there is something wrong in the generated Makefile, then it's either the config I'm providing to qmake or your prc file that is the root cause of the issue. Fix that ;)

There is actually 2 way to cheat it :


- see "man touch" (there is a section about last modified date)


- or edit the Makefile a bit more
 
Last edited by a moderator:
prc file? is that a Qt config file somewhere in the /usr/local/angstrom folders? It sounds familiar, because I think I was looking at that the last time with KeePassX.


But if all I'm getting is a single warning and no errors, why is no binary being produced?


Re your "cheat" saying modify the Makefile, we've just established that you can't do that because the makefile gets rewritten when you qmake, or have I missed something? :blink:
 
prc file? is that a Qt config file somewhere in the /usr/local/angstrom folders? It sounds familiar, because I think I was looking at that the last time with KeePassX.
Sorry I was talking about the *.pro file that should be in your projact directory

Re your "cheat" saying modify the Makefile, we've just established that you can't do that because the makefile gets rewritten when you qmake, or have I missed something? :blink:
Then remove the rule that force qmake to rerun ;)
 
Sorry I was talking about the *.pro file that should be in your projact directory
Other than a list of files to be included in the project, there's only a deployment folder and some symbian options. There's basically nothing to change in here

# Add more folders to ship with the application, here


folder_01.source = qml/Src


folder_01.target = qml


DEPLOYMENTFOLDERS = folder_01


# Additional import path used to resolve QML modules in Creator's code model


QML_IMPORT_PATH =


symbian:TARGET.UID3 = 0xE29931B0


# Smart Installer package's UID


# This UID is from the protected range and therefore the package will


# fail to install if self-signed. By default qmake uses the unprotected


# range value if unprotected UID is defined for the application and


# 0x2002CCCF value if protected UID is given to the application


#symbian:DEPLOYMENT.installer_header = 0x2002CCCF


# Allow network access on Symbian


symbian:TARGET.CAPABILITY += NetworkServices



Re your "cheat" saying modify the Makefile, we've just established that you can't do that because the makefile gets rewritten when you qmake, or have I missed something? :blink:
Then remove the rule that force qmake to rerun ;)
Where is this rule set? I'm sorry if this sounds pretty trivial to you, this is basically foreign to me.
 
Where is this rule set? I'm sorry if this sounds pretty trivial to you, this is basically foreign to me.

That's the one I have for qOrganizer :



Code:
Makefile: qOrganizer.pro  /usr/share/qt4/mkspecs/linux-pandora-g++/qmake.conf /usr/share/qt4/mkspecs/qconfig.pri \

            	/usr/share/qt4/mkspecs/features/qt_functions.prf \

            	/usr/share/qt4/mkspecs/features/qt_config.prf \

            	/usr/share/qt4/mkspecs/features/exclusive_builds.prf \

            	/usr/share/qt4/mkspecs/features/default_pre.prf \

            	/usr/share/qt4/mkspecs/features/release.prf \

            	/usr/share/qt4/mkspecs/features/default_post.prf \

            	/usr/share/qt4/mkspecs/features/warn_on.prf \

            	/usr/share/qt4/mkspecs/features/qt.prf \

            	/usr/share/qt4/mkspecs/features/unix/thread.prf \

            	/usr/share/qt4/mkspecs/features/moc.prf \

            	/usr/share/qt4/mkspecs/features/resources.prf \

            	/usr/share/qt4/mkspecs/features/uic.prf \

            	/usr/share/qt4/mkspecs/features/yacc.prf \

            	/usr/share/qt4/mkspecs/features/lex.prf \

            	/usr/share/qt4/mkspecs/features/include_source_dir.prf \

            	/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/libQtSql.prl \

            	/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/libQtCore.prl \

            	/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/libQtGui.prl \

            	/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib/libQtNetwork.prl

    	$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-pandora-g++ -unix -o Makefile qOrganizer.pro
 
Managed to build this finally - I think it's a misunderstanding of what qmake actually is...


You see, I expected qmake to "make" the project (aka compile it), but that's where I think I went wrong - it only generates the Makefile - you then run "make" to actually build it.


Rather frustating, but then I've yet to see a build environment that doesn't have it's quirks.


Thanks for the help
 
As you found, qmake is the translator to native-make that QT uses; its a good idea.. they want you to be able to define the project requirements in a non-platform-specific way, and let qmake do the localization. It also has some pretty handy features that may be hard/impossible in some make's .. ie: you can customize the rules per-platform in your pro file, and in make it'd be less convenient (and/or require piles of #ifdes); sebt3's toolchain includes customized qmake configuration so it generally spits out the right kind of Makefile for his toolchain.


jeff
 
Back
Top