www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/21/08:26:32

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
Lines: 21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 19 Apr 1997 21:56:24 GMT, "Gringo" <jackgibs AT sprynet DOT com> 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   *************/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019