Xcode搭建Python編譯環境

2021-09-08 11:30:30 字數 776 閱讀 6576

確認安裝了python

zx:~ zx$ which python

/usr/bin/python

2.開啟xcode,新建工程,選擇 "other"| "externail building system".

3.buildtool填入 "/usr/bin/python"

4.先建乙個test.py檔案,輸入

print "hello,world";

5.editscheme中,選中run後需要做三件事情:

5.1 info中,buildconfiguration選擇debug; executable選擇/usr/bin/python檔案;不勾選"debug executable"

5.2 arguments中,啟動引數新增檔名"test.py"

5.3 options中,勾選working directory下的自定義目錄,然後選擇test.py所在的目錄.

over,執行就可以得到 hello,world.

參考資料:

Xcode搭建Python編譯環境

確認安裝了python zx zx which python usr bin python 2.開啟xcode,新建工程,選擇 other externail building system 3.buildtool填入 usr bin python 4.先建乙個test.py檔案,輸入 print ...

Xcode10搭建python環境

pycharm好煩啊,又還不怎麼會寫python 還是用比較習慣的xcode 吧 已經建立完乙個project了 那就記錄一下防止以後忘記吧 等下次再用記得配圖 step1 新建external build system,在build tool 中填寫python路徑 step2 編輯scheme ...

xcode編譯配置

之前做cocos2dx的時候一直不明白srcroot和project dir是什麼具體含義,以為是2dx構建的,最近才查了一些資料。1.srcroot 巨集和 project dir 巨集 都指 xcodeproj所在的父目錄。2.search paths裡有引號和沒有引號的區別 雙引號的作用是如果...