richardjm wrote:
I have compiled stdcxx 4.2.1 with SUNWspro (using build flags
debug,shared,threads and the sunpro.config) and when I try to run a simple
helloworld application I get a missing symbol for the ostream<< operator. If
I remove the inline keyword from the operator<< templates in include/ostream
then this symbol is no longer missing but I get an assert failure about a
null facet.

Is removing inline from the function templates the way to solve the missing
symbol? If so, how do I ensure that the facets are not null? If not, what is
the correct way to ensure that the inline operator<< symbol are visible?

Making a function defined in a header out-of-line is not the right
solution. Linker errors for this simple use case sound more like
either a configuration/usage problem in your code or a bug in the
compiler.

stdcxx 4.2.1 was tested with several versions of Sun C++ on both
Solaris (SPARC and x86) and Linux (x86). I'm not aware of any
problems like the one you describe. You can the 4.2.1 test results
on this page: http://stdcxx.apache.org/builds/4.2.1/

My advice to you is to find the compiler/OS on the page above that
matches yours the closest, open the log for your configuration (12d
or 12D, depending on if you did a 32-bit or 64-bit build), and see
if your command line options are different and how.

If you can't find anything of use post the source of a small test
case along with the full command line (compiler + linker) needed
to reproduce the problem, as well as the exact compiler version
(the output of CC -V) as well as the name and version of the OS
and the hardware you're using (the output of uname -spr).

Btw., you can also see the compiler and linker options we use by
making one of the example programs that come with stdcxx. E.g.,
make -C$(BUILDDIR)/examples ostream.

Martin


Apologies if this is not the correct mailing list for this question, and
thanks in advance for any help you may be able to offer.

Richard.

Reply via email to