[C++-SIG] Re: Problems building and testing CXX demo
Steve Harris
sharris at primus.com
Tue May 9 19:02:00 CEST 2000
> Which g++ version ?
$ g++ -v
Reading specs from /usr/local/sun4/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.2/specs
gcc version 2.95.2 19991024 (release)
> Looks like (maybe) your compiler has problem with namespaces
> (Py::blabla::blablabla) and that certainly is a lack of
> old-non-ISO-compilant compilers.
>
> The error occurs in r.cxx and example.cxx You can try an nm on the
> files and look what the compiler has generated as defined and
> expected. The mangled names may lack the Py:: prefix (?).
Here's some output:
$ nm -V
nm: Software Generation Utilities (SGU) Solaris/ELF (3.0)
$ nm example.o | egrep 'as_string'
[841] | 0| 0|NOTY |GLOB |0 |UNDEF |as_string__CQ22Py6Object
$ nm r.o | egrep 'number_remainder'
[303] | 0| 0|NOTY |GLOB |0 |UNDEF |number_remainder__Q22Py19PythonExtensionBaseRCQ22Py6Object
I can't really understand if the "Py" in there is in fact a namespace
qualifier. It's also interesting that if I use the '-C' option to nm
to de-mangle the names, I get the same results back out. Does that
mean that nm doesn't understand the name mangling?
> Then, maybe the link editor has problem with mangled names ? Did
> you use Gnu ld or not ? (we are NOT using binutils, ld and co...)
I'm not sure. Here's the version dump:
$ ld -V
ld: Software Generation Utilities - Solaris/ELF (3.0)
I was going to try building binutils in repsonse to a Usenet post¹ I
found that mentioned an error message I've encountered while
compiling. That would contradict your advice here.
> As I told you in my previous email, we succeeded with a gcc
> snapshot. I mean this is NOT gcc 2.95.2, we tryed it but it fails
> with CXX.
Okay. I missed that detail. We're obviously using 2.95.2 right now.
Footnotes:
¹ http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=512435895&search=thread&CONTEXT=957888607.1283653636&HIT_CONTEXT=957888588.1283325957&HIT_NUM=5&hitnum=1
--
Steven E. Harris
Primus Knowledge Solutions, Inc.
http://www.primus.com
More information about the Cplusplus-sig
mailing list