解压下载到的.gz源码:
gunzip xxx.tar.gz
tar xvf xxx.tar, 其实在Mac中可以直接双击解压的.
然后定位到解压后的目录下:
./configure
make
sudo make install
这样Qt就会被安装到/usr/local/Trolltech/qt-4.4.0 了
这样, 就可以用qmake了.
/usr/local/Trolltech/Qt-4.4.0/bin/qmake -project
/usr/local/Trolltech/Qt-4.4.0/bin/qmake 
make -f Makefile
open ./Qt01.app

In order to use Qt, some environment variables need to be extended.

            PATH               - to locate qmake, moc and other Qt tools
This is done like this:
In .profile (if your shell is bash), add the following lines:

PATH=/usr/local/Trolltech/Qt-4.3.4/bin:$PATH
export PATH

保存、退出 vim,最后重新启动终端,新路径就有了:可以用 echo $PATH 看看。

2. 打开 *.app 文件:你可以直接在 Finder 中双击打开啊(要转到/usr/local/Trolltech/Qt-4.4.0/bin 目录,在 Finder 菜单中有的)
或者在终端中使用 open *.app 这样就可以了。

3. 发布 qt 程序,和 Win 上一样,也是找到需要的 dylib 等资源,然后打包一起发布。
XCode 中也有相关工具的,见 /Developer/Applications,具体我没有尝试过,以后大家一起探索看看...

http://www.cppblog.com/biao/archive/2008/05/09/49271.html

相关文章:

  • 2021-11-30
  • 2017-11-23
  • 2021-10-05
  • 2021-12-16
  • 2021-05-23
  • 2021-08-07
  • 2021-05-14
  • 2022-02-28
猜你喜欢
  • 2021-11-11
  • 2021-04-05
  • 2022-01-13
  • 2021-06-21
  • 2021-05-23
  • 2021-07-18
  • 2021-04-25
相关资源
相似解决方案