-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile c++ Addon using G++ 9.2 on macOS High Sierra, '-stdlib=libc++' #1931
Comments
Related to #469 ? |
actually I would like to disable the -stdlib=libc++ compiler flag |
I'm afraid the answer right now is "you can't." node-gyp inherits the setting from node's xcode_emulation.py translates that to As a workaround, you can run |
that's actually sad :( |
@ArthoPacini if you're up to it then we'd consider a patch to gyp here to add some functionality to support what you need. Tests would be nice even if they involved mocks but I know that might get awkward. |
Is there a way to passing |
So i'm creating a c++ module to node, I was using the default clang++ compiler and it was great, but at some point i needed to use the library, but clang++ does not ship with it. The works on G++ 9.2 though, so i switched the compiler that node-gyp uses to my g++-9 and i got this error : g++-9: error: unrecognized command line option '-stdlib=libc++'
indeed GCC does not recognize this command line option, so i tried to remove this argument but could'nt find a way, i tried using 'cflags!' : ['-stdlib=libc++'] and 'cflags_cc!' : ['-stdlib=libc++'] on binding.gyp but none of these worked.
also, i've tried to use boost/filesystem, it compiles perfectly on clang++, but throws and error on runtime, that's why i'm sticking with gcc.
The text was updated successfully, but these errors were encountered: