stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: Any ideas on these StdLib build errors?
Date Mon, 13 Feb 2006 20:25:50 GMT
Nicole Willson wrote:
> Well, I have stdlib compiling without errors.  My compile line is:
> xlC -F ${VACCFG} -qarch=ppc64 -q64 -D_RWSTD_NO_IMPLICIT_INCLUSION
> -D_RWCONFIG=std64rd -I./../../../include -I./../../.. -I.. -I.
> -D_RWBUILD_std -qpic -qrtti -g -qsuppress=1540-0152:1540-2908:1500-029
> -qnotempinc -c ../various_files.cpp
> As you can see, I had to add _RWSTD_NO_IMPLICIT_INCLUSION. 

You should not need to do that. The -qnotempinc option is supposed
to cause the XLC++ __TEMPINC__ macro to be #undefined. rw/_config.h
looks at the XLC++ macro and overrides _RWSTD_NO_IMPLICIT_INCLUSION
accordingly. See below.

More important, though, is that you shouldn't be using -qnotempinc
at all. It's an inferior template instantiation model that causes
all kinds of problems, including code bloat and ODR violations.
The recommended mode is -qtemplateregistry (which doesn't solve all
the problems but it's better and the hope is that eventually it will).
If you feel like experimenting (since you are using an untested mode
:) you could give -qtempinc a try. That mode, while old and not really
enhanced by IBM anymore, gave the best overall results with prior
release of the compiler on AIX.

Here's the _config.h magic:

    // VisualAge for C++ version >=, when the tempinc model
    // (which makes use of implicit inclusion) is in effect (i.e.,
    // when neither of -qtemplateregistry or -qnotempinc is specified
    // on the command line) the compiler defines the macro __TEMPINC__
#  if __IBMCPP__ < 502 || !defined (__TEMPINC__)
      // override the autodetected setting of the macro
#  endif

#  if __IBMCPP__ >=  502 && defined (__TEMPINC__)
      // override the autodetected setting of the macro
#  endif   // VAC++ >= 5.0.2 && __TEMPINC__


View raw message