1. ios 開啓c++11ios
CXXFLAGS += -std=c++11 -stdlib=libc++ -Weverything
LDFLAGS += -lc++
-miphoneos-version-min=5.0 c++
若是出現macos
start", referenced from: implicit entry/start for main executable
macosx_version_min 10.8錯誤,則改成
-miphoneos-version-min=6.0iphone
2.關於main函數
not
int main(int argc, char* argv[])
but
int main(int argc, char *argv[])函數
3.cmake要設置變量
-DCMAKE_OSX_SYSROOT="$v"c++11
4.ip
gcc g++ 不要加 -arch 參數ci