我想創建一個簡單的跨平臺C++項目與gyp。目前我只是試圖在Mac上 - 但最終想讓它爲Windows,Linux,ios和Android構建。 HEre是我正在使用的簡單gyp文件。 我希望能夠使用ninja以及來自此gyp的xcode/msvc項目。 我知道我需要能夠將
-std = C++ 11和-libstdC++添加到clang的命令行中,但現在我只能看到使用g ++而不是clang生成的構建文件。使用C + + 11與GYP項目
這是我的gyp文件。
{
'targets': [
{
'target_name': 'libtest',
'product_name': 'test',
'type': 'static_library',
'sources': [
'./src/lib.cpp',
],
'include_dirs': [
'include',
],
},
{
'target_name': 'testapp',
'type': 'executable',
'sources': [
'./test/test.cpp',
],
'include_dirs': [
'src',
],
'dependencies': [
'libtest'
],
},
],
}
您是否遇到'clang:error:無效的部署目標--stdlib = libC++(需要OS X 10.7或更高版本)'? – drewish 2014-05-26 18:36:05
剛纔我碰到了。還沒有弄清楚。在OSX 10.10上。 – johnhaley81 2014-10-19 03:56:54