Declaration of swprintf for MinGW users. - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html) +--- Forum: OALWrapper (https://www.frictionalgames.com/forum/forum-30.html) +--- Thread: Declaration of swprintf for MinGW users. (/thread-15372.html) |
Declaration of swprintf for MinGW users. - someone972 - 05-11-2012 In case anyone decides to use MinGW to compile HPL1/OALWrapper, you may have found that the version of swprintf provided with MinGW takes three arguments, omitting the size of the buffer. The four argument function exists in MinGW, but it is under a different name. To remedy this I created the following header: PHP Code: #ifndef MINGW_FUNCTION_DECL_H PHP Code: #ifdef __MINGW32__ Feel free to provide feedback or criticisms of my method. Hopefully this will be of use to anyone using MinGW. RE: Declaration of swprintf for MinGW users. - Urkle - 05-11-2012 A better way maybe to rework that code to simply use a wstring.. wchar stuff is such a PITA. |