From owner-freebsd-hackers Wed Apr 8 17:35:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA18427 for freebsd-hackers-outgoing; Wed, 8 Apr 1998 17:35:22 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cabri.obs-besancon.fr (cabri.obs-besancon.fr [193.52.184.3]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA18421 for ; Wed, 8 Apr 1998 17:35:13 -0700 (PDT) (envelope-from jmz@cabri.obs-besancon.fr) Received: by cabri.obs-besancon.fr (5.57/Ultrix3.0-C) id AA28700; Thu, 9 Apr 98 02:37:54 +0200 Date: Thu, 9 Apr 98 02:37:54 +0200 Message-Id: <9804090037.AA28700@cabri.obs-besancon.fr> From: Jean-Marc Zucconi To: freebsd-hackers@FreeBSD.ORG Subject: Cryptic ld message (gcc bug?) X-Mailer: Emacs Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id RAA18422 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This happens when I compile with "c++ -g -O", but not with only "c++ -g" or only "c++ -O". What do this means ? ld: /tmp/ccLf96521.o: unexpected multiple definitions of symbol `this:V25', type 0x27 Ì:484352: Definition of symbol `this:V25' (multiply defined) ld: /tmp/ccLf96521.o: unexpected multiple definitions of symbol `this:V25', type 0x27 Ì:484352: Definition of symbol `this:V25' (multiply defined) Here is the source program (the error disapear if you remove the last 3 lines!): #include class X { private: double **x; public: X () {}; ~X () {}; double data (int i, int j) {return x[i][j];} }; X *D; main (int argc, char **argv) { double e2, b; int i, j, i1, i2; D = new X; j = 20; double y[j]; i1 = 4; i2 = 8; e2 = 2; for (i = 0 ; i < j; i++) if (D->data (i, 1) < e2) break; for (i = i2; i < j; i++) { b = D->data(i, 0) - D->data(i1, 0); y[i] *= exp (b*b*3); } for (i = 0; i < i1; i++) { b = D->data(i, 0) - D->data(i1, 0); y[i] *= exp (b*b*3); } } Jean-Marc _____________________________________________________________________________ Jean-Marc Zucconi Observatoire de Besancon F 25010 Besancon cedex PGP Key: finger jmz@cabri.obs-besancon.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message