Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling Problem

1 view
Skip to first unread message

Andrea Consiglio

unread,
May 8, 2001, 1:16:09 PM5/8/01
to
Dear friends,

I have been using a C++ matrix library for some time. Now I updated my
linux box to SeSe 7.1, Kernel 2.4 which comes with a gcc/g++ compiler
version 2.95.2 and I am not able to compile it anylonger. I got the
following message:
g++ -c -O -Wall matcomp.cc
matcomp.cc: In function `class matrix operator >=(const matrix &, const
matrix &)':
matcomp.cc:93: initialization of non-const reference type `class matrix
&'
matcomp.cc:93: from rvalue of type `matrix'
matrix.hpp:689: in passing argument 1 of `matrix::matrix(matrix &)'

Do you have any clue ? What does this message means ?

Please, email me.

Thansk Andrea

--
Andrea Consiglio
Dipartimento di Organizzazione Aziendale, Universita' della Calabria.
87036 Arcavacata di Rende (CS) - Italy
Voice: 00-39-0984-492253, Fax: 00-39-0984-492288
Email: a.con...@unical.it, Web: www.ucy.ac.cy/ucy/pba/consiglio/

a.consiglio.vcf

Nithyanandham

unread,
May 9, 2001, 2:20:56 AM5/9/01
to Andrea Consiglio

Andrea Consiglio wrote:

> matcomp.cc: In function `class matrix operator >=(const matrix &, const
> matrix &)':
> matcomp.cc:93: initialization of non-const reference type `class matrix
> &'
> matcomp.cc:93: from rvalue of type `matrix'
> matrix.hpp:689: in passing argument 1 of `matrix::matrix(matrix &)'

make matrix::matrix(matrix &) as
matrix::matrix(const matrix &).

--Nithyanand.

Ronald Fischer

unread,
May 9, 2001, 5:17:58 AM5/9/01
to
Andrea Consiglio <a.con...@unical.it> writes:

> This is a multi-part message in MIME format.

If you don't mind, please don't post in MIME

> matcomp.cc:93: initialization of non-const reference type `class matrix
> &'
> matcomp.cc:93: from rvalue of type `matrix'
> matrix.hpp:689: in passing argument 1 of `matrix::matrix(matrix &)'
>
> Do you have any clue ?

Probably you are doing exactly what the message says: You initialize a
const-reference of the matrix constructor with an rvalue, which is not
legal (but had been legal in very early C++ version, for instance in the
AT&T translator up to release 2.0). This type of error usually occurs
when you are recompiling old C++ code which has not been touched for
ages.

Of course, we could tell you more if you also posted some code.

> Please, email me.

Please read the news. Thank you.

Ronald
--
Do NOT reply to the address given in the From: header. If you want to
reply by mail, use the following address (after deleting the XXX):
Ronald Otto Valentin Fischer <rov...@thekeyboard.com>
(Tired of getting spam after posting a message? http://www.deadspam.com)

0 new messages