Opened 12 years ago

Closed 10 years ago

#4682 closed Bugs (wontfix)

Compile issue with putenv using gcc-mingw-4.5.0 C++0x

Reported by: viboes Owned by: Gennadiy Rozental
Milestone: Boost 1.45.0 Component: test
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: vicente.botet@…

Description

Using gcc-mingw-4.5.0 C++0x

After

> cd libs/test/build
> bjam toolset=gcc cxxflags="-std=c++0x"

I get the following compile error

gcc.compile.c++ ..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0\debug\link-static\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:31,
                 from ..\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

    "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -g -std=c++0x -DBOOST_ALL_NO_LIB=1  -I"..\..\.." -c -o "..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0\debug\link-static\unit_test_parameters.o" "..\src\unit_test_parameters.cpp"

...failed gcc.compile.c++ ..\..\..\bin.v2\libs\test\build\gcc-mingw-4.5.0\debug\link-static\unit_test_parameters.o...

Change History (3)

comment:1 by Vladimir Prus, 12 years ago

Severity: ShowstopperProblem

Given that you're using experimental complication mode, this is not a showstopper for 1.45. Anyway, how about providing a patch?

in reply to:  1 comment:2 by viboes, 12 years ago

Replying to vladimir_prus:

Given that you're using experimental complication mode, this is not a showstopper for 1.45. Anyway, how about providing a patch?

I have moved to lightweight_test so for me this is no more a show-stopper. I have no time now to provide a pact.

Best, Vicente

comment:3 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.