lwille/node-gphoto2

change binding.gyp for mac for build the package

gentilmente opened this issue · 1 comments

I`m not an expert, sorry if this is not the correct way of ask for this change. It solved me a building problem.

'cflags': [ '--std=c++11' ],

'OTHER_CPLUSPLUSFLAGS' : [ '-std=c++11',

In both cases change it to 14

My system:
mac osx 12.0.1
updated xcode cli tools
node 14.16.0

In the same direction, in order to be able to upgrade node to v16 you need to folow these instructions
https://github.com/electron/electron/issues/18397
in bining.cc:

extern "C" {
  NAN_MODULE_INIT(init) {
    Nan::HandleScope scope;
    GPhoto2::Initialize(target);
    GPCamera::Initialize(target);
  }

  #if NODE_MAJOR_VERSION >= 10
  NAN_MODULE_WORKER_ENABLED(gphoto2, init)
  #else
  NODE_MODULE(gphoto2, init)
  #endif
}