Boost C++ Libraries: Ticket #6252: mingw gcc-4.5.0 compiler error : undeclared swprintf https://svn.boost.org/trac10/ticket/6252 <pre class="wiki">gcc.compile.c++ ..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0x\debug\link-static\threading-multi\unit_test_parameters.o In file included from ..\..\../boost/test/utils/runtime/cla/dual_name_parameter.hpp:19:0, from ..\..\../boost/test/impl/unit_test_parameters.ipp:32, from ..\..\..\libs\test\src\unit_test_parameters.cpp:16: ..\..\../boost/test/utils/runtime/config.hpp: In function 'void boost::runtime::putenv_impl(boost::runtime::cstring, boost::runtime::cstring)': ..\..\../boost/test/utils/runtime/config.hpp:95:51: error: 'putenv' was not declared in this scope In file included from ..\..\../boost/test/utils/runtime/interpret_argument_value.hpp:28:0, from ..\..\../boost/test/utils/runtime/cla/argument_factory.hpp:25, from ..\..\../boost/test/utils/runtime/cla/typed_parameter.hpp:25, from ..\..\../boost/test/utils/runtime/cla/basic_parameter.hpp:21, from ..\..\../boost/test/utils/runtime/cla/named_parameter.hpp:21, from ..\..\../boost/test/utils/runtime/cla/dual_name_parameter.hpp:21, from ..\..\../boost/test/impl/unit_test_parameters.ipp:32, from ..\..\..\libs\test\src\unit_test_parameters.cpp:16: ..\..\../boost/lexical_cast.hpp: In member function 'bool boost::detail::lexical_stream_limited_src&lt;CharT, Traits, RequiresStringbuffer&gt;::shl_float(float, wchar_t*)': ..\..\../boost/lexical_cast.hpp:1248:120: error: there are no arguments to 'swprintf' that depend on a template parameter, so a declaration of 'swprintf' must be available ..\..\../boost/lexical_cast.hpp:1248:120: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) ..\..\../boost/lexical_cast.hpp: In member function 'bool boost::detail::lexical_stream_limited_src&lt;CharT, Traits, RequiresStringbuffer&gt;::shl_double(double, wchar_t*)': ..\..\../boost/lexical_cast.hpp:1269:122: error: there are no arguments to 'swprintf' that depend on a template parameter, so a declaration of 'swprintf' must be available "c:/MINGW/bin/g++" -ftemplate-depth-128 -std=c++0x -O0 -fno-inline -Wall -pedantic -g -mthreads -DBOOST_ALL_NO_LIB=1 -I"..\..\.." -c -o "..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0x\debug\link-static\threading-multi\unit_test_parameters.o" "..\..\..\libs\test\src\unit_test_parameters.cpp" ...failed gcc.compile.c++ ..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0x\debug\link-static\threading-multi\unit_test_parameters.o... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6252 Trac 1.4.3 Gennadiy Rozental Mon, 05 Nov 2012 09:44:15 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6252#comment:1 https://svn.boost.org/trac10/ticket/6252#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> You do not need to compile boost.test library itself in std=c++0x mode. Compiler removes extensions and sticks to ansi. You can use std=gnu++0x though. </p> Ticket