stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: _RWSTD_TEST_SRC define used in build of tests in "... Dll" configurations
Date Thu, 14 Sep 2006 20:09:34 GMT
Farid Zaripov wrote:
>   The tests in "... Dll" (8d, 11d, 12d, 15d) configurations are
> compiling with defined _RWSTD_TEST_SRC macro.
> I think it's unnecessary. I have investigated what for this define used
> and found that is used to disable
> __declspec (dllimport) keyword because the rwtest library is always
> compiled as static library,

But it should be built as a shared library when stdcxx is. It's
a limitation of our infrastructure that it's always built as an

There are some interesting use cases (especially on Windows but
on other platforms as well) that our testsuite fails to exercise
as a result. The Rogue Wave proprietary build infrastructure does
create an rwtest shared library when stdcxx is also built that way.
  We should enhance the infrastructure to build rwtest as a shared

(One such test is the ability to pass stdcxx objects such as
std::string across shared library boundaries. Another is the
ability to use the standard iostream objects in the initialization
of another shared library.)

> but
> _RWSHARED macro (which is defined because the stdlib is dynamic library)
> forces __declspec(dllimport)
> without _RWSTD_TEST_SRC defined.
>   Another (minor) issue is that librarian creates export files
> rwtest.exp (due to __declspec (dllexport)) which are useless.
>   I see two ways to improve this:
> 1) generate rwtest as dynamic library when stdlib is dynamic library

I vote for this.

> 2) generate rwtest always as static library and rename _RWSHARED macro
> to _RWTESTSHARED (or any other)
> in testdefs.h (to save possibility of generation rwtest library as
> dynamic library).
>   I don't know what about RWDLL macro, but it's not defined anywhere.

I think it's a vestige of the Rogue Wave build and test infrastructure.
We can't remove it yet, not until we have completed the transition of
the stdcxx test suite.


View raw message