From: bukinm AT inp DOT nsk DOT su (Michael Bukin) Newsgroups: comp.os.msdos.djgpp Subject: Re: Why 'undefined reference' in link? Date: Mon, 21 Apr 1997 11:59:47 GMT Organization: BINP SD RAS Message-ID: <335e5533.6980050@news-win.inp.nsk.su> References: <01bc4d0c$7b280d60$c6ceaec7 AT gibsonjb> Reply-To: bukinm AT inp DOT nsk DOT su NNTP-Posting-Host: csd-bsdi.inp.nsk.su Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 21 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On 19 Apr 1997 21:56:24 GMT, "Gringo" wrote: > Creating: hexgrid.exe > Error: hex.o: In function `HEX::SetSize(int)': > hex.cc(15) Error: undefined reference to `HEX::size' > > /*********** hex.h *************/ > > class HEX { > private: > static int size; > > /*********** hex.cc *************/ Give definitions for each static data members, like this: int HEX::size = 0; > /*********** End hex.cc *************/