【问题标题】:How to generate XCode project on Mac with node-gyp如何在 Mac 上使用 node-gyp 生成 XCode 项目
【发布时间】:2013-08-15 22:28:36
【问题描述】:

我正在使用 node-gyp 来构建 node.js 插件。 binding.gyp 文件的内容是

{
  'targets': [
    {
      'target_name': 'myapp',
      'include_dirs': ['api-sdk'],
      'sources': [ 'main.cpp', 'lib.cpp'],
      'cflags!': [ '-fno-exceptions' ],
      'cflags_cc!': [ '-fno-exceptions' ],
      'conditions': [
        ['OS=="mac"', {
          'xcode_settings': {
            'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
          }
        }]
      ]
    }
  ]
}

在 Windows 上,当我运行 node-gyp configure 时,会自动生成 Visual Studio 项目。但是在Mac上,执行node-gyp configure后并没有生成对应的XCode项目。

有人知道如何使用 Node-gyp 生成 XCode 项目吗?我应该在 binding.gyp 文件中添加一些设置吗?

谢谢,

杰弗里

【问题讨论】:

  • 嗨,杰弗里,你解决了吗?

标签: xcode macos node.js node-gyp


【解决方案1】:

放赏金后自己解决了... :)

node-gyp configure -- -f xcode

是这个问题的答案。

【讨论】:

  • 我试图复制该 binding.gyp 并运行 node-gyp configure -- -f xcode 但它没有生成项目。我应该做的任何其他事情
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-10-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-23
  • 2010-09-10
  • 1970-01-01
相关资源
最近更新 更多