-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
npm install canvas fails: Macro definition of snprintf conflicts with Standard Library function declaration #605
Comments
I don't think that it's possible to come around this without source changes, although it doesn't seem to hard to fix. This is the offending line binding.gyp L66
I don't know the best way to solve this, if possible maybe it could be solved in the // Compatibility with Visual Studio versions prior to 2014
#ifndef snprintf
#define snprintf _snprintf
#endif |
great. I hope this gets fixed at the source. |
Hey guys, I've posted a solution for this. |
I have the same issue, fix this please |
Pull request very welcome, feel free to try out the solution at the bottom of my last post, and post it as a pull request. |
Fixed by #670 |
This solves elad#110. It's similar to this issue on node-canvas: Automattic/node-canvas#605 Basically, Visual Studio didn't have snprintf, so it had to be polyfilled, like it has been done here. But now, in 2015, snprintf was finally implemented, which leads to it being defined twice. This change lets me compile the project on Windows 7 x64, with Visual Studio 2015.
This solves elad#110. It's similar to this issue on node-canvas: Automattic/node-canvas#605 Basically, Visual Studio didn't have snprintf, so it had to be polyfilled, like it has been done here. But now, in 2015, snprintf was finally implemented, which leads to it being defined twice. This change lets me compile the project on Windows 7 x64, with Visual Studio 2015.
This solves elad#110. It's similar to this issue on node-canvas: Automattic/node-canvas#605 Basically, Visual Studio didn't have snprintf, so it had to be polyfilled, like it has been done here. But now, in 2015, snprintf was finally implemented, which leads to it being defined twice. This change lets me compile the project on Windows 7 x64, with Visual Studio 2015.
Hi,
I've installed VS2015 and I have a suspicion that this is due to this.
npm install canvas fails to build with errors:
I've seen this post
http://stackoverflow.com/questions/27754492/vs-2015-compiling-cocos2d-x-3-3-error-fatal-error-c1189-error-macro-definiti
but this requires source changes.
Or is there another way to have this successfully installed?
Thanks.
The text was updated successfully, but these errors were encountered: