Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) ::swprintf has not been declared

 

Qt CreatorWindows

 

::swprintf has not been declared is a compile error I encountered when using Qt Creator under Windows 7.

 

 

 

 

 

Solution

 

Add the following statement before the first #include:

#undef __STRICT_ANSI__

 

Or more portable:

 

#ifdef _WIN32
#undef __STRICT_ANSI__
#endif

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict