Hi.. i am trying to run clang code in nodejs. I am using node.gyp module for that. i have code that is running fine on Linux and MacOS but when i am compiling it on windows it is throwing an error.
Steps i have followed
- Clang library
- Build .so file of the Clang library
- Include that .so file in c program (file.cc)
- Using node-gyp convert c program (file.cc) into .node file
Details of MacOS :
Apples-MBP-3:~ Apple$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Apples-MBP-3:~ Apple$ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Details for Ubuntu :
shivam@zz:~$ gcc --version
gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
shivam@zz:~$ g++ --version
g++ (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Details for Windows :
gcc (tdm64-1) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\zz\Downloads\storj_windows>g++ --version
g++ (tdm64-1) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Tried
i have tried different compiler but doesn't work for me .
Error i am getting

Binding.gyp file i am using while building
{
'targets': [
{
'target_name': 'file',
'sources': [ './file.cc'],
"include_dirs":["./"],
"libraries":["<(module_root_dir)/clang.so"],
"ldflags": ["-Wl,-rpath,'$$ORIGIN'"],
"cflags_cc": ["-fexceptions","-fPIC","-Wno-unknown-pragmas"]
}
]
}
Question:
- How can i resolve above error ?
- Is this issue related to different compiler ?
Hi.. i am trying to run clang code in nodejs. I am using node.gyp module for that. i have code that is running fine on Linux and MacOS but when i am compiling it on windows it is throwing an error.
Steps i have followed
Details of MacOS :
Details for Ubuntu :
Details for Windows :
Tried
i have tried different compiler but doesn't work for me .
Error i am getting
Binding.gyp file i am using while building
Question: