Opened 11 years ago

Closed 10 years ago

#6252 closed Bugs (wontfix)

mingw gcc-4.5.0 compiler error : undeclared swprintf

Reported by: viboes Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.48.0 Severity: Problem
Keywords: mingw swprintf Cc:

Description

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<CharT, Traits, RequiresStringbuffer>::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<CharT, Traits, RequiresStringbuffer>::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...

Change History (1)

comment:1 by Gennadiy Rozental, 10 years ago

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.