Failure to find resource.h
Tuesday, January 3, 2012 - 12:51
Hi all,
I have been reading the wiki and trying to get it compiled. As I understand it first needs to generate a makefile by going through qmake-qt4 and then using Nokia QTCreator or am I inccorect in assuming that ?
https://gitorious.org/orange-engine/pages/Home
when trying to make a makefile this is the error I'm getting :-
~/games/orange-engine/qrpgedit$ qmake-qt4 -makefile qrpgedit.pro
WARNING: Failure to find: resource.h
Now can somebody tell me how to work around this resource.h, maybe I did something wrong ?
Honestly, I'm not sure how the idea that you needed to generate a Makefile to compile it in QtCreator got in there.
Here's what I would do (your mileage may vary):
When I compiled everything on windows, I didn't have to touch the makefiles. QtCreator generates them for you.
As for the warning, I get it too, and it doesn't affect my ability to compile the code.
bart,
I did as adviced. First, I opened both the projects and said clean all.Clean all is the fourth option in the Build Menu.
Now when I tried (again) to build the projects individually, with qrpgedit I again got the dreaded message, I guess I first to have to build them using qmake (within qtcreator) and then do it.
Running build steps for project qrpgedit...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: Entering directory `/home/shirish/games/orange-engine/qrpgedit-build-desktop'
make: *** No rule to make target `/usr/lib64/qt4/mkspecs/linux-g++/qmake.conf', needed by `Makefile'. Stop.
make: Leaving directory `/home/shirish/games/orange-engine/qrpgedit-build-desktop'
The process "/usr/bin/make" exited with code 2.
Error while building project qrpgedit (target: Desktop)
When executing build step 'Make'
This is the console output from QTCreator.
When I right-click on either of the projects a menu appears . It goes something like this :-
a. Set as startup project
b. Build project 'qrpgedit'
c. Rebuild project 'qrpedit'
d. Deploy project 'qrpgedit' (understandably it is greyed out)
e. Clean project 'qrpgedit'
f. Run qmake
Also is there any sequence in which both of these have to be done, maybe qrpgengine the first and then qrpgedit or anyway is good ?
Looking forward for answers.
Try manually deleting all the Makefiles before you build the project in qmake.
Also, switch back to the master branch. I've merged the qtquick branch in with it (although that won't make a difference here).
I removed the 'Makefile' from qrpgedit and got the same issue as before. Couldn't you edit the qrpgedit.pro so it finds correct library paths.
This is what it says when I try to run it again :-
Running build steps for project qrpgedit...
Starting: "/usr/bin/qmake-qt4" /home/shirish/games/orange-engine/qrpgedit/qrpgedit.pro -r CONFIG+=debug -spec /usr/lib64/qt4/mkspecs/linux-g++
Failure to read QMAKESPEC conf file /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf.
Error processing project file: /home/shirish/games/orange-engine/qrpgedit/qrpgedit.pro
The process "/usr/bin/qmake-qt4" exited with code 3.
Error while building project qrpgedit (target: Desktop)
When executing build step 'qmake'
I dunno about other distributions but in debian especially on 64-bit distro you have two library paths, /lib and /lib32 . Also the qmakespec conf file which it wants to have is in
/usr/share/qt4/mkspecs/linux-g++$ ls
qmake.conf qplatformdefs.h
There is possibility that ubuntu guys also might be following the same pattern (although dunno).
It would be nice to know if I'm correct or incorrect in my assesment .
Also didn't know that Makefiles are not just in the folders/directories qrpgedit and qrpgengine but ALSO qrpgedit-build-desktop and qrpgengine-build-desktop as well.
One more question, how do I switch to master branch ?
switch to the master branch with:
git checkout master
git merge origin/master
If you've made changes, you may need to do:
git reset --hard
before you switch branches.
Okay, if in the qrpgedit and qrpgengine directories there are any files called ending with .pro.user or .pro.user*, delete them and try again. If that doesn't work, I'm not quite sure what to tell you. Nowhere in my .pro files am I specifying anything about /lib64. The only thing I'm thinking is that maybe a .pro.user file got committed when it shouldn't and qtcreator is paying attention to that when it shouldn't be.
In fact, when I grep for lib64, it does show up in .pro.user.
Bart
there is/are pro.user both in qrpgedit and qrpgengine.
~/games/orange-engine/qrpgengine$ ls qrpgengine.
qrpgengine.cpp qrpgengine.pro qrpgengine.pro.user.2.1pre1
qrpgengine.o qrpgengine.pro.user
$ ls qrpgedit.pro
qrpgedit.pro qrpgedit.pro.user qrpgedit.pro.user.2.1pre1
removed both the pro.user* files.
Well, what to say, if I do reset --hard then both the projects have 'Makefile' as well as .pro. user.2.1pre1 files which I had deleted come back :(
If you feel it may help I'm willing to do a clean checkout to see if this problem goes away.
Sure, but what's the problem? Remove the pro.user files and the makefiles, then compile and let me know if it works.
Did the above and I still get the same error as before :-
Running build steps for project qrpgedit...
Starting: "/usr/bin/qmake-qt4" /home/shirish/games/orange-engine/qrpgedit/qrpgedit.pro -r CONFIG+=debug -spec /usr/lib64/qt4/mkspecs/linux-g++
Failure to read QMAKESPEC conf file /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf.
Error processing project file: /home/shirish/games/orange-engine/qrpgedit/qrpgedit.pro
The process "/usr/bin/qmake-qt4" exited with code 3.
Error while building project qrpgedit (target: Desktop)
When executing build step 'qmake'
One of the things I forgot to share was there are quite a few directories in /usr/share/qt4/mkspecs/ and all of them have qmake.conf.
cd /usr/share/qt4/mkspecs/linux-
linux-cxx/ linux-g++-32/ linux-icc/ linux-kcc/ linux-pgcc/
linux-ecc-64/ linux-g++-64/ linux-icc-32/ linux-llvm/
linux-g++/ linux-g++-maemo/ linux-icc-64/ linux-lsb-g++/
Seems the only option is perhaps a clean checkout, lemme know if that would help ?
This really seems to me like a problem with your build environment.
Did you install Qt Creator with your OS's package manager?
Apparently there's a QMAKESPEC environment variable that you can point to the directory in question. Try setting
QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++-64
or
QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
Bart
Yes, I have qtcreator from my distribution .See :-
$ aptitude search qtcreator
i qtcreator - lightweight integrated development environment (IDE) for Qt
p qtcreator-dbg - debugging symbols for Qt Creator IDE
i qtcreator-doc - documentation for Qt Creator IDE
13:08:39 shirish@deb-home: ~$ aptitude show qtcreator
Package: qtcreator
State: installed
Automatically installed: no
Version: 2.2.1-1
Priority: optional
Section: devel
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Uncompressed Size: 42.5 M
Depends: libqt4-help (>= 4:4.7.1), libqt4-sql-sqlite, libc6 (>= 2.2.5), libgcc1 (>= 1:4.1.1), libqt4-declarative (>=
4:4.7.1), libqt4-designer (>= 4:4.7.1), libqt4-network (>= 4:4.7.1), libqt4-script (>= 4:4.7.1), libqt4-sql
(>= 4:4.7.1), libqt4-svg (>= 4:4.7.1), libqt4-xml (>= 4:4.7.1), libqtcore4 (>= 4:4.7.1), libqtgui4 (>=
4:4.7.1), libqtwebkit4, libstdc++6 (>= 4.4.0)
Recommends: gdb, make, qt4-demos, qt4-dev-tools, qt4-doc, qtcreator-doc, xterm | x-terminal-emulator
Suggests: cmake, git-core, kdelibs5-data, subversion
Description: lightweight integrated development environment (IDE) for Qt
Qt Creator is a new, lightweight, cross-platform integrated development environment (IDE) designed to make development
with the Qt application framework even faster and easier.
It includes:
* An advanced C++ code editor
* Integrated GUI layout and forms designer
* Project and build management tools
* Integrated, context-sensitive help system
* Visual debugger
* Rapid code navigation tools
* Supports multiple platforms
Homepage: http://www.qtsoftware.com/developer/qt-creator
Tags: devel::debugger, devel::ide, implemented-in::c++, interface::x11, role::program, uitoolkit::qt, x11::application
$ apt-show-versions -a qtcreator
qtcreator 2.2.1-1 install ok installed
qtcreator 1.3.1-3 stable ftp.au.debian.org
qtcreator 1.3.1-3 testing ftp.au.debian.org
qtcreator 2.2.1-1 unstable ftp.au.debian.org
qtcreator 2.4.0-1 experimental ftp.au.debian.org
qtcreator/unstable uptodate 2.2.1-1
I do know that there is a command such as :-
setenv QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++ OR
export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
but IIRC it sets the environment only for this instance. This should be permanent.
use export, or, better yet, set it in your .bash_profile (or .bashrc, I don't remember which).
You may need to log out and back in for it to work.
Did that and was finally able to compile and run the demo/engine whatever.
I will probably put up the findings on the wiki.Especially the bit about setting the build environment and removing the Makefile and .pro.user files. Perhaps there could be a small script be written for it.
Btw there were compile/build issues both with qrpgedit and qrpgengine. If you want I can put them here or can send an e-mail with whatever warnings that appeared during the make processors.