🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1551

bug: multiple constant definitions cause multiply defined symbols

#1551
From: Webster Dove
Date: Sun, 04 Dec 1988 23:15
19 lines
1177 bytes
In InterViews-2.4 src/include/allegro/space.h there are the following
lines: 
/*
 * Protocol definitions.
 */

const int objectspace_Find = 1;
const int objectspace_Clone = 2;
const int objectspace_Destroy = 3;

Since this header file is included in several liballegro.a modules,
the constants show up multiply defined at load time.  Is this the
proper c++ behavior?  Should the loader recognize identical constant
declarations and not report any message, and report an error if they
are not identical for the same variable?

In another similar vain, I had problems with initiatized static
members in a class header file (multiply defined symbols).  What is
the solution?
Technical Details
Message-ID: <8812042315.AA28765@rocket.sanders.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!UCBVAX.BERKELEY.EDU!decvax!savax!rocket!dove

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!UCBVAX.BERKELEY.EDU!decvax!savax!rocket!dove
From: decvax!savax!rocket!dove@UCBVAX.BERKELEY.EDU (Webster Dove)
Newsgroups: gnu.g++.bug
Subject: bug: multiple constant definitions cause multiply defined symbols
Message-ID: <8812042315.AA28765@rocket.sanders.com>
Date: 4 Dec 88 23:15:45 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 18