PDA

View Full Version : Getting started on a Mac



scarleton
14th January 2011, 02:25
Early in my career as a profession software developer I mucked around with Linux (mid 90's), but that seems like a life time ago. I have been doing Qt programming on Windows for about a year. It is now time to expand to the Mac. But I am a bit out of my element...

Two weeks ago when I first got the Mac, I downloaded a binary from Qt and installed it. This gave me all the Qt GUI apps, Qt Creator, Assistant, Designer, Linguist, etc. Discovered I needed to install XCode, which I did, then I got side tracked.

Today I am back trying to do some basic QML development and I cannot run anything. I found the installation instructions in the Qt docs (http://doc.qt.nokia.com/4.7/install-mac.html). It talks about downloading a tar bar, extracting it, running configuration, building and making (what I recall from the old Linux days). The problem is I recall downloading a dmg and running an install.

So, I drilled down to /usr/local/Trolltech/Qt-4.7.1, and there is no bin directory.

So, now I am totally confussed. I am guessing I have everything ( SDK and source) somewhere on this machine. I figure I simply need to find it, run configure, make, and make install, set the environment variables, etc and life will be good.

The only question is: Where is it:cool:

Sam

MattPhillips
14th January 2011, 02:49
I'm not at my Mac right now but look in your Developer (or Programming, but I think it's the former) top level directory. Qt should be in it and you can make your way to the home directory from there.

Matt

scarleton
14th January 2011, 04:02
Yea, I found that a while back. The main problem I have right now is trying to run a qml file in Qt Creator. The green run button is gray. I am assuming that things are not setup correctly. Further, I am assuming I need to configure/compile/install Qt. The question is:

Where do I go to configure/compile/install Qt upon installing from the dmg file?

MattPhillips
14th January 2011, 04:14
Is it just qml files that are the problem? Can you run a regular (non-qml) demo through QtCreator?

scarleton
14th January 2011, 05:47
No, Here is the error message I am getting:

Could not find make command: make in the build environment
Error while building project graphicsview (target: Desktop)
When executing build step 'Make'

pkohut
14th January 2011, 06:23
No, Here is the error message I am getting:

Could not find make command: make in the build environment
Error while building project graphicsview (target: Desktop)
When executing build step 'Make'
make is in /Developer/usr/bin
and
/usr/bin/make
which are symbolic links to gnumake in their respective directories.

Check that the /usr/bin is set in the bash path.

What does typing
make --version
gcc --version
at the terminal return?

scarleton
14th January 2011, 13:52
Ok, at the day job right now so I cannot answer the version questions, will this evening, but...

I did install Qt BEFORE XCode, does that matter?

scarleton
16th January 2011, 15:27
Ok, when I do an echo $PATH, I get:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

But there is no make or gcc in the path, though I am able to start /Developer/Applications/Xcode and get to the "Welcome to Xcode" dialog.

What am I missing?

MattPhillips
19th January 2011, 13:12
I never had to do any special install of gcc, make, etc. to get things going on a Mac, I'm pretty sure they come with Xcode.

As for your error messages, on an HP I get exactly those messages when, on the Projects page, the Qt version I use is 'Qt in Path' rather than 'Qt 4.7.0', ,'Qt 4.6.3', etc. I can't look at this on my Mac now but I expect it's the same thing. In this situation, under 'Build Steps', it says 'make not found in the environment'--are you getting this? Moreover I *am* able to run qmake in this case. I don't understand exactly what the problem is here, but the solution is just to switch to another Qt version, something != 'Qt in Path'. As soon as you're able to get rid of 'make not found', you're good.

HTH,
Mattt