[build] Little help required

Hi, I need to create Jamfile.v2 where one of the tests must be compiled on MSVC compilers with additional flag /Zc:wchar_t- How shall I change the following lines: test-suite conversion : # A lot of [ run ... ] lines [ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/<link>static ] # Requires /Zc:wchar_t- ; Best regards, Antony Polukhin

AMDG On 12/05/2011 08:04 PM, Antony Polukhin wrote:
I need to create Jamfile.v2 where one of the tests must be compiled on MSVC compilers with additional flag /Zc:wchar_t- How shall I change the following lines:
test-suite conversion : # A lot of [ run ... ] lines [ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/<link>static ] # Requires /Zc:wchar_t- ;
Add <toolset>msvc:<cxxflags>/Zc:wchar_t- to the requirements. The signature of run is rule run ( sources + : args * : input-files * : requirements * : target-name ? : default-build * ) In Christ, Steven Watanabe

2011/12/6 Steven Watanabe <watanabesj@gmail.com>:
Add <toolset>msvc:<cxxflags>/Zc:wchar_t- to the requirements.
Tried : [ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/<link>static : : : <toolset>msvc:<cxxflags>/Zc:wchar_t- : : ] And... It does not work. Looks like "/Zc:wchar_t-" changes methods signatures. And that leads to linker errors: lexical_cast_typedefed_wchar_test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall boost::unit_test::unit_test_log_t::test_start(unsigned long)" (?test_start@unit_test_log_t@unit_test@boost@@UAEXK@Z) lexical_cast_typedefed_wchar_test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall boost::unit_test::unit_test_log_t::test_finish(void)" (?test_finish@unit_test_log_t@unit_test@boost@@UAEXXZ) l ... Any other ideas? Best regards, Antony Polukhin

AMDG On 12/06/2011 08:54 AM, Antony Polukhin wrote:
2011/12/6 Steven Watanabe <watanabesj@gmail.com>:
Add <toolset>msvc:<cxxflags>/Zc:wchar_t- to the requirements.
Tried :
[ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/<link>static : : : <toolset>msvc:<cxxflags>/Zc:wchar_t- : : ]
And... It does not work. Looks like "/Zc:wchar_t-" changes methods signatures. And that leads to linker errors:
lexical_cast_typedefed_wchar_test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall boost::unit_test::unit_test_log_t::test_start(unsigned long)" (?test_start@unit_test_log_t@unit_test@boost@@UAEXK@Z) lexical_cast_typedefed_wchar_test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall boost::unit_test::unit_test_log_t::test_finish(void)" (?test_finish@unit_test_log_t@unit_test@boost@@UAEXXZ) l ...
Any other ideas?
Ah. So the test library needs to be compiled with this option as well: import feature ; feature.feature nowchar : on : composite optional propagated link-incompatible ; feature.compose <nowchar>on : <cxxflags>/Zc:wchar_t- ; ... <toolset>msvc:<nowchar>on (Warning: untested) In Christ, Steven Watanabe

2011/12/6 Steven Watanabe <watanabesj@gmail.com>:
Ah. So the test library needs to be compiled with this option as well:
import feature ;
feature.feature nowchar : on : composite optional propagated link-incompatible ;
feature.compose <nowchar>on : <cxxflags>/Zc:wchar_t- ;
...
<toolset>msvc:<nowchar>on
(Warning: untested)
Works. Great thanks! Final version: import feature ; feature.feature nowchar : on : composite optional propagated link-incompatible ; feature.compose <nowchar>on : <cxxflags>/Zc:wchar_t- ; test-suite conversion : # A lot of [ run ... ] [ run lexical_cast_typedefed_wchar_test.cpp ../../test/build//boost_unit_test_framework/<link>static : : : <toolset>msvc:<nowchar>on : : ] ; Best regards, Antony Polukhin
participants (2)
-
Antony Polukhin
-
Steven Watanabe