[H-GEN] g++ question

Paul Gearon pag at tams.com.au
Mon Feb 15 03:13:00 EST 1999


Hi all,

A friend of mine is trying to compile OpenQubit on a Sparc Solaris system.
He's using gcc 2.7 and the program is written in c++.  When he tries making
the program he gets a heap of errors, starting with:

In file included from /usr/local/lib/g++-include/std/complex.h:7,
                 from /usr/local/lib/g++-include/complex:5,
                 from qstate.h:32,
                 from qstate.cc:26:
/usr/local/lib/g++-include/std/complext.h:57: warning: friend declaration
`FLOAT real(const class complex<FLOAT> &)'
/usr/local/lib/g++-include/std/complext.h:57: warning:   will not be treated
as a template instantiation
/usr/local/lib/g++-include/std/complext.h:57: warning:   unless you compile
with -fguiding-decls
/usr/local/lib/g++-include/std/complext.h:57: warning:   or add <> after the
function name
/usr/local/lib/g++-include/std/complext.h:58: warning: friend declaration
`FLOAT imag(const class complex<FLOAT> &)'
/usr/local/lib/g++-include/std/complext.h:58: warning:   will not be treated
as a template instantiation

.... and so on for several pages, followed by a slew of parse errors.  Now
the problem is that this compiles fine with gcc 2.7 on a Linux system (intel
or sparc - we've tried both).  It looks like the compiler is choking on
templates, but I don't know why since these are in the STL.  I suggested
that he try adding the -fguiding-decls option, but he said that he got just
as many errors.

I'm stumped.  Any suggestions?

Paul Gearon
gearon at computer.org

Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane
mittam.
(Translation from latin: "I have a catapult. Give me all the money, or I
will fling an enormous rock at your head.") 

-
This is list (humbug) general handled by majordomo at humbug.org.au .  Postings
are accepted only from subscribed addresses of lists general or general-post.



More information about the General mailing list