Closed GoogleCodeExporter closed 9 years ago
sprintf_s() is a function provided by Visual C++
http://msdn.microsoft.com/en-us/library/ce3zzk1k(v=vs.80).aspx
snprintf() is a C99 standard function that VC does not provide.
What does you platform provide for the same function?
Do you have any suggestion for better compatibly?
Original comment by milo...@gmail.com
on 31 Jan 2012 at 7:52
snprintf() exist on this platform (MarmaladeSDK), but project build with non
system librares in visual studio (VS compiler for x86; gcc for ARM/MIPS or RVCT
for ARM) or xcode(gcc).
Simple solution is to create #define like PLATFORM_UNKNOWN with minimal
functionality (for open source compilers like gcc). User can be set this in
configuration header file to turn off platforms specific features like
sprintf_s.
Please look this example
http://cocos2d-x.org/projects/cocos2d-x/repository/revisions/master/entry/cocos2
dx/platform/CCPlatformConfig.h - this is multiplatform game engine platform
detection header.
Original comment by archj...@gmail.com
on 31 Jan 2012 at 8:56
This issue won't be fixed recently.
In future, I will try to abstract most functions like this, and may provide
custom number to string converter internally to remove the dependency on
snprintf().
Original comment by milo...@gmail.com
on 19 Feb 2012 at 3:47
Original issue reported on code.google.com by
archj...@gmail.com
on 24 Jan 2012 at 6:04