-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support msvc compiler (be able to produce Node.js native addons) #12009
Comments
Use |
@nc-x Lol what 😄 Oh my God, I almost learned the contents of |
Yeah, i just checked, it is not there in --help or --fullhelp. |
That's a material for another issue 😃 |
Seems to work perfectly... Are Nim creators even Humans? I mean everything seems so good... I'll close this for now, but will reopen if something pops out. |
@anurbol Did it work (I mean making the nodejs native addon thingy)? Any repo or tuts? |
Summary
Generated c/c++ code should not contain GCC-specific stuff (e.g. attribute).
Description
I wanted to write a node addon in Nim, but unfortunately without success. I managed to do everything needed (getting generated .cpp files from
nimcache
folder, exporting nim symbols with .exportc.), but failed at the last stage.Turns out that Node addons binaries (Windows ones) are built exclusively by msvc (via node-gyp), and the compiler does not understand Nim-generated c/c++ code, since the code is GCC specific. To be more specific, Nim generates
__attribute__
things that's OK for GCC, but not for msvc, and msvc producesc3646 unknown override specifier
errors.Alternatives
Well, I have to stick with c++ for now (I wanted to switch to Nim so badly)
The text was updated successfully, but these errors were encountered: