www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/11/15:15:23

From: Nayas Lyun <nayas1 AT soback DOT kornet DOT nm DOT kr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Need help with compilation errors using Djgpp
Date: Sun, 12 Apr 1998 02:40:20 +0900
Organization: Korea Telecom
Lines: 33
Message-ID: <352FAB04.BEF6142@soback.kornet.nm.kr>
References: <352ed78e DOT 2050353 AT news DOT tir DOT com>
NNTP-Posting-Host: 210.123.159.21
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


S.G wrote:

> Hi, I'm new to C++ programming and to the Djgpp environment.
> I have created project inside the rhide and tried to compile and
> link it, however, there were some errors showed up and I don't
> know what it means and how to solve it.
> I have included the appropriate .h files in the main. Here are the
> errors:
>
> atest.cc:10: undefined reference to `Heap<int>::BinaryHeap(int)'
> atest.cc:12: undefined reference to `Heap<int>::Insert(int)'
> atest.cc(.text+0x56): undefined reference to `Heap<int>::Insert(int)'
> c:/djgpp/tmp\ccdaaaaa(.text+0x80):atest.cc: more undefined references
> to `Heap<int>::Insert(int)' follow
> c:/djgpp/tmp\ccdaaaaa: In function `main':
> atest.cc:20: undefined reference to `Heap<int>::FindMin(void)'
> atest.cc:21: undefined reference to `Heap<int>::DeleteMin(void)'
>
> the heap.h files contains a template class declaration of Heap.
>

 This looks like typical Link problem. (the undefined reference message,
came from Linker, indeed.) . There can be some reason for this,
lib file not exist or, command line syntax... etc.

 I can't figure out what is, in your case. consult Djgpp FAQ, linker
problem,
and more. most linker error can be solved by FAQ.

nayas

- Raw text -


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