angel511wong / nixysa

Automatically exported from code.google.com/p/nixysa
Apache License 2.0
1 stars 0 forks source link

Windows: _snprintf not in scope #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to generate a plugin using nixysa
2. Receive a compile error

What is the expected output? What do you see instead?
The expected output would be:
scons: done building targets

Instead, I get:
C:\Sources\nixysa\nixysa\static_glue\npapi\common.cc:185:48: error: '_snprintf'
was not declared in this scope
scons: *** [C:\Sources\nixysa\nixysa\static_glue\npapi\common.o] Error 1
scons: building terminated because of errors.

What version of the product are you using? On what operating system?
Nixysa SVN revision 73.
Windows XP SP2
MinGW-20110211
Python-2.7
scons-2.0.1
pywin32-216

Please provide any additional information below.
The problem was resolved adding the "stdio.h" library to the scope. I would 
recommend to change the "common.cc" file and add the following line to the 
OS_WINDOWS block:

#ifdef OS_WINDOWS
#include <windows.h>
#include <stdio.h>
#define snprintf _snprintf
#endif 

Original issue reported on code.google.com by repi...@gmail.com on 12 Mar 2011 at 1:40