PDA

View Full Version : how to run Qt on Mac? don't know the basics



eric
1st August 2008, 15:49
Hi,

I've been struggling with this for a few days now. I need to compile a Qt prgram using Mac but I cannot figure out how to get Qt running on Mac. I need to compile my program statically using plugins. I can do it on XP but Macs are a different universe. I'd appreciate it if some Mac person took the time to answer my stupid questions. I need a bit more explaining because I really don't know Macs.

1) I installed Qt prcompiled version (qt-mac-opensource-4.4.1.dmg). Everything seems OK. But I don't find command prompt like Win has it. Where is it? There's nothing like configure.exe anywhere? I don't even know how to start.

2) Instructions are available (http://doc.trolltech.com/4.4/deployment-mac.html) but they are of little use to me since I don't even know how to get to the location where I should use them.

Thanks a lot in advance!

eric
4th August 2008, 17:27
If someone could point me in the right direction with running Qt on a Mac, I'd be really thankful. I only have my loaner Mac for a couple of more days and during that time I need to figure out how to run Qt on it. Then I can go back to XP and good days continue :).

Even if you can't fully help me, maybe you have some ideas.

Thanks!

THRESHE
5th August 2008, 16:18
What are you trying to do?

If you want to compile your app on the Mac you'd better use Xcode. To generate Xcode project from your .pro file open terminal and cd to you project dir and then type
"qmake -spec macx-xcode MyProj.pro"

eric
6th August 2008, 16:00
Thanks you so much! You got me started.

I'd like to ask more questions to find out how to use Xcode.
1) Is it something that came with my "Qt for Mac" download or do I need to download it separately?
2) Can Xcode compile statically and include the imageformat plugins (that I need)?
3) How do I open terminal to use Xcode? Sorry for the beginner question but I'm really new with Macs?
4) Can I use my C++ files and the Windows pro file directly to compile for Mac using Xcode? Or do I need to change something in the code or pro file?

Thanks a lot in advance!

THRESHE
8th August 2008, 13:04
Thanks you so much! You got me started.
You're welcome ;)

I'd like to ask more questions to find out how to use Xcode.
1) Is it something that came with my "Qt for Mac" download or do I need to download it separately?
No Xcode is a separate IDE for Mac OS X its freeware and you can download it somwhere on http://developer.apple.com/


2) Can Xcode compile statically and include the imageformat plugins (that I need)?
There is a freeware utility for deploying Qt on Mac its called DeployQt you can use it separately or add a custom build phase for your Xcode project. If you want I can send you a sample project :rolleyes:


3) How do I open terminal to use Xcode? Sorry for the beginner question but I'm really new with Macs?
Terminal is sort of cmd.exe on Windows and you can find it on every Mac at /Applications/Utilities/Terminal.app


4) Can I use my C++ files and the Windows pro file directly to compile for Mac using Xcode? Or do I need to change something in the code or pro file?
.pro file is a Qt file so if you didn't include any Windows headers in it you can try to use it on the Mac. As for me I've changed smth


Thanks a lot in advance!
Again you're welcome if you have any Qt/Mac questions I'll try to help you ;)
Good luck

eric
19th August 2008, 15:42
Thanks Threshe for your thorough answers.

I will look into DeplyQt. I guess the first thing is to get Xcode running. I downloaded and installed it but don't know how to try to compile things with it. I would really appreciate a sample mac project for Xcode/DeployQt that you so kindly offered.
Do you still need to have Qt installed if you have Xcode and want to compile a Qt project?
Does anyone know of a quick introduction to Xcode basics?

Thanks