MacOS (10.13) +qt (5.5.0) +xcode (8.3.3) C + + development environment configuration

Source: Internet
Author: User

  • VMware Virtual Machine installs MacOS (installed here is MacOS X 10.13), Baidu Many, no longer detailed.
  • Install Xcode (Xcode8.3.3 is installed here)
    • Download (https://developer.apple.com/download/)
    • Installation
  • Install the Commondlinetoolsforxcode (8.3.2 is installed here)
    • Download (https://developer.apple.com/download/)
    • Installation
    • Check
    xcode-select --install//如果提示Update, 说明已安装
  • Install Qt5.5.0
    • installed here in the default location (/users/xxx/qt5.5.0 directory)
    • go to the directory and drag the shortcut to the dock, and you'll be able to open QT from the dock shortcut later.
    • because the Xcode version is high, you need to modify the next Qt configuration
      • Open file:
        Qt_install_folder/5.5.0/clang_64/mkspecs/features/mac/default_ PRE.PRF
      • found this line:
        IsEmpty ($ $list ($ $system ("/usr/bin/xcrun-find xcrun 2>/dev/null"))
      • replaced by:
        IsEmpty ($ $list ($ $system ("/usr/bin/xcrun-find xcodebuild 2>/dev/null"))
    • After the above steps, generally OK, you can open the Q T create a new Qwidget project run, if OK is all done.
    • environment variable Configuration
      • if you want to use qmake under a terminal, you must configure the environment variable. Otherwise, you will be prompted-bash:qmake:command not found
       //Open terminal Bash_profile file VI ~/.bash_profile//Add the following (xxx means your user name) export Qtdir=/users/xxx/qt5.5.0export ld_library_path= $LD _ Library_path: $QTDIR/libexport path= $PATH: $QTDIR/binexport path= "/users/xxx/qt5.5.0/5.5/clang_64/bin: $PATH"//Save Exit Then enter the following command to make the environment variable effective source ~/.bash_profile//turn the terminal back on, use the following command to view the environment variable echo $PATH//Enter the following command to view the Qmake version qmake-v  

MacOS (10.13) +qt (5.5.0) +xcode (8.3.3) C + + development environment configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.