Robin
Robin

Reputation: 715

Qt Installation Problems on Mac OS X

Over the past 2 years I've had to install Qt 4.5, 4.6 and now 4.7 from source on Mac OS X. Each install causes me no end of trouble. My 2 main issues are:

First I'd like to know what Qt files I should have on my machine and where, when correctly installed. My 'official' installs are in /usr/local/Trolltech, but everything's duplicated in my ~ directory so that I can step through Qt code. I'm sure I'm doing something wrong, as the only other mention of this anywhere is a stackoverflow question that I raised myself.

Also, how do I use Qt frameworks in my Xcode projects? I tried the following:

The last bullet fixes my linking errors, but I'm assuming I should be able to see Qt frameworks in the list of available frameworks (both in Xcode and About This Mac->Software->Frameworks).

A separate issue I guess, but having got that far, my data formatters in Xcode broke yet again. Where should my data formatter bundle be located in Xcode 3.2.3 and what should the function look like for QStrings?

Any help much appreciated. Thanks.

Upvotes: 2

Views: 2024

Answers (1)

Stephen Chu
Stephen Chu

Reputation: 12832

I use Qt Creator instead of Xcode with Qt. So I can't help you on the Xcode project part. But I do have some success on building Qt with debug information. Unzip Qt source to some place that won't get wipe out like /qt. This is the steps I use to build it:

cd /qt
./configure -prefix '.' -opensource -confirm-license -debug-and-release
make -j4
make docs

-j4 is just to make it build 4 jobs simultaneously. You don't really need that. Then don't do make install. This will leave the built libraries and frameworks in the source directory. It's needed to be able to step into Qt's own source. When installed in a different directory, Qt lose link to its own source files.

Debugging on the Mac is still hit and miss. I don't know what can be done to improve it. Apple's version of gdb is kind of behind so maybe that is why.

Upvotes: 1

Related Questions