mingw gcc-4.5.0 compiler error: Undeclared swprintf
gcc.compile.c++ ..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0x\debug\link-static\threading-multi\exception_safety.o
In file included from ..\..\../boost/test/interaction/interaction_based.hpp:27:0,
from ..\..\../boost/test/impl/exception_safety.ipp:29,
from ..\..\..\libs\test\src\exception_safety.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\exception_safety.o" "..\..\..\libs\test\src\exception_safety.cpp"
Change History
(3)
Owner: |
changed from nasonov to Antony Polukhin
|
Status: |
new → assigned
|
Version: |
Boost 1.48.0 → Boost 1.49.0
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
This looks like a mingw bug. It has been reported and looks like it is fixed (at least it is not reproduced at mingw-4.5.2_0x).
Workaround was proposed:
(must be added to lexical_cast.hpp after #includes ao before the inclusion of lexical_cast.hpp)
I`ll test it on mingw by myself and then apply to trunk.