{"id":217,"date":"2016-11-26T17:33:39","date_gmt":"2016-11-26T09:33:39","guid":{"rendered":"http:\/\/www.zhuyanbin.com\/?p=217"},"modified":"2016-11-26T17:33:39","modified_gmt":"2016-11-26T09:33:39","slug":"qt-project-error-xcode-not-set-up-properly","status":"publish","type":"post","link":"https:\/\/www.yanbin888.com\/?p=217","title":{"rendered":"Qt Project ERROR: Xcode not set up properly"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\">\u5347\u7ea7xcode \u540e Qt \u51fa\u95ee\u9898\u4e86\uff0cgoogle \u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6cd5\u3002<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">http:\/\/stackoverflow.com\/questions\/33728905\/qt-creator-project-error-xcode-not-set-up-properly-you-may-need-to-confirm-t<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">~&gt; Xcode 8<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">This problem occurs when command line tools are installed after Xcode is installed. What happens is the\u00a0<\/span><span class=\"s2\">Xcode-select<\/span><span class=\"s1\">\u00a0developer directory gets pointed to\u00a0<\/span><span class=\"s2\">\/Library\/Developer\/CommandLineTools<\/span><span class=\"s1\">.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Step 1:<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Point\u00a0<\/span><span class=\"s2\">Xcode-select<\/span><span class=\"s1\">\u00a0to the correct Xcode Developer directory with the command:<\/span><\/p>\n<p class=\"p3\"><span class=\"s1\">sudo xcode-select -switch \/Applications\/Xcode.app\/Contents\/Developer<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Step 2:<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Confirm the license agreement with the command:<\/span><\/p>\n<p class=\"p3\"><span class=\"s1\">xcodebuild -license<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">This will prompt you to read through the license agreement.\u00a0<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Enter\u00a0<\/span><span class=\"s2\">agree<\/span><span class=\"s1\">\u00a0to accept the terms.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">&gt;= Xcode 8<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Step 1:<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">As Bruce said, this happens when Qt tries to find\u00a0<\/span><span class=\"s2\">xcrun<\/span><span class=\"s1\">\u00a0when it should be looking for\u00a0<\/span><span class=\"s2\">xcodebuild<\/span><span class=\"s1\">.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Open the file:<\/span><\/p>\n<p class=\"p3\"><span class=\"s1\">Qt_install_folder\/5.7\/clang_64\/mkspecs\/features\/mac\/default_pre.prf<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Step 2:<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Replace:<\/span><\/p>\n<p class=\"p3\"><span class=\"s1\">isEmpty($$list($$system(&#8220;\/usr\/bin\/xcrun -find xcrun 2&gt;\/dev\/null&#8221;))))<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">With:<\/span><\/p>\n<p class=\"p3\"><span class=\"s1\">isEmpty($$list($$system(&#8220;\/usr\/bin\/xcrun -find xcodebuild 2&gt;\/dev\/null&#8221;)))<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5347\u7ea7xcode \u540e Qt \u51fa\u95ee\u9898\u4e86\uff0cgoogle \u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6cd5\u3002 http:\/\/stackoverflow. <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"https:\/\/www.yanbin888.com\/?p=217\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[6,25],"class_list":["post-217","post","type-post","status-publish","format-standard","hentry","category-mac","category-qt","tag-mac-os-x","tag-qt"],"_links":{"self":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217"}],"version-history":[{"count":1,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}