Build warnings on new project
-
Well, normally I don't mind shaking out a beta copy, but as new to this as I am, I think I'd have a hard time discerning between legitimate bugs and cockpit error, so I think I'd better stick with something relatively reliable.
So, as far as installing things separately, I'm confused: what should I be looking to get the new version of: Creator or the Framework? I do see a Creator 2.1 for my platform; is that what you suggest I download?
Thanks.
-
OK, I'll download them.
Now, if you can explain this, I'll really be impressed: how is it that the "libs only" download is so much bigger than the "includes build and interface tools" one?
http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x
(This is the right download, isn't it?)
-
OK, I'm not sure that I'm going this right, but...the built-in tutorial on debugging calls for using something called "Textfinder" which I couldn't find in my examples. So, I tried running it on my project.
The first thing I noticed was that it just ran through to completion without letting me set a breakpoint. Am I supposed to open an editor and set my breakpoints before even loading the debugger?
Second, I got some error messages:
bq. Unable to read symbols for QtGui.framework/Versions/4/QtGui (file not found).
Unable to read symbols from "QtGui" (not yet mapped into memory).
Unable to read symbols for QtCore.framework/Versions/4/QtCore (file not found).
Unable to read symbols from "QtCore" (not yet mapped into memory).bq.So...what have I done wrong to get these messages? Is it a configuration error, or have I failed to download some essential files?
I downloaded the 4.7.0 SDK, Creator 2.1 and the 4.7.2 libraries for my platform. Was this correct?
Also, I'm still getting the errors mentioned above.
Can someone tell me what I'm doing wrong? Thanks.
-
First, you must tell Qt Creator that you have a new Qt version (Settings, Qt4, then hit the add button and fill in the full path to qmake of the version you need).
Then you must go to the settings of your current project (project view) and choose the newly added version.
Then you should completely re-build you project to catch up the new settings etc. and link against the new version. Don't forget to choose the debug settings! Otherwise, the compiler will not generate debugging output.
Breakpoints can be set at any time, befere debugging, as well as when the debugger runs.
The "unable to read symbols..." message seem not to be critical, I suppose it's because the release versions of the libs are loaded.
-
First, you must tell Qt Creator that you have a new Qt version (Settings, Qt4, then hit the add button and fill in the full path to qmake of the version you need).
Settings being Preferences, I assume (I'm on a Mac).
And, how do I know the version of qmake that I need? Currently, I seem to be using /usr/bin/qmake, which is a link to a file called qmake-4.7 in the same directory. Is this not the correct qmake?
And, in your second paragraph, are you referring to Preferences -> Projects -> CMake? That's the only place I can find to enter anything like a pathname for a makefile.
Thanks.
-
Yep, it's preferences (Cmd-,).
The 4.7.2 version is installed somewhere. I cannot tell you where, as I do compile the libs myself. You have to add the full path to qmake of that version. What version is /usr/bin/qmake (call /usr/bin/qmake -version in the Terminal.app).
In the second paragraph I meant the project view of Qt creator. It's not in the preferences, it's the last but one icon in the mode selector on the left.
!http://doc.qt.nokia.com/qtcreator-2.1/images/qtcreator-breakdown.png!
You can change the "settings":http://doc.qt.nokia.com/qtcreator-2.1/creator-build-settings.html for the various projects there
-
OK, I ran the qmake -version command, and it's telling me it's using 4.7.0. I guess this is expected, as I haven't found 4.7.2 yet.
So, am I looking for a directory structure with 4.7.2 or something similar in it? I'm struggling to find things a bit from finder, as Spotlight only show visible files and directories, and Qt seems to put stuff in invisible areas (like /usr). Any tips on how I might chase the new version down?
EDIT:
Oh yeah...mdfind. Sorry for asking the same question twice in a 24-hour period. I'll get this stuff down; there's just a lot to digest at the moment.
-
Breakthrough! I couldn't find those files, because they weren't there. Evidently, I needed to download and install BOTH .dmg files for 4.7.2 for the Mac. (That wasn't clear to this tyro.)
So...I went to the Qt4 preferences, and rebuilt the debugging helpers, turning the red X into a nice green check mark. So, progress definitely has been made. (I didn't use the add button as you suggested, but I think I'm OK here. Please let me know if you think otherwise.)
Now, for the second step of your procedure: in my build settings, the Qt version pull-down says Qt in PATH. In my PATH, I'm pointing to /Developer/Tools/Qt, which has a qmake alias that points to version 4.7.2. So, again, I assume I'm OK, right?
But...I'm still getting those stupid directory not found messages. I guess I'm not all the way home yet, am I?
-
The symlink and PATH version are ok. Everything seems ok from here.
I'm not sure what's going wrong here. I have a different setup, so I cannot test it. And unfortunately it's not allowed to put OS X onto a virtual machine to have a testing sandbox.
You might get some more infos on IRC channels #qt-creator and #qt on freenode.
-
Is it possible I screwed up one of the steps you mentioned above? Anything else I should try rebuilding?
EDIT:
Here's the error message I get when I try to build:
bq. No rule to make target 'clock.cpp', needed by 'clock.o'. Stop.
clock is the first file alphabetically, so I assume it would happen with any.
I found a Makefile in the build-desktop directory, and deleted it. It was regenerated, so I guess that answers that question, but...it seems to be picking up some information about the build from somewhere.
So...what's the "right" way to put this back in order?
Thanks.
-
I don't understand the claim that the problem with the warnings (directory not found) is fixed in the latest builds.
I'm running the very latest version of Qt (based on 4.8, not even any 4.7 variant) and I still see those warning messages every time I build on my Mac
I might add that I've seen this claim expressed in many different places, but it's not my experience.