From: Nayas Lyun 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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::BinaryHeap(int)' > atest.cc:12: undefined reference to `Heap::Insert(int)' > atest.cc(.text+0x56): undefined reference to `Heap::Insert(int)' > c:/djgpp/tmp\ccdaaaaa(.text+0x80):atest.cc: more undefined references > to `Heap::Insert(int)' follow > c:/djgpp/tmp\ccdaaaaa: In function `main': > atest.cc:20: undefined reference to `Heap::FindMin(void)' > atest.cc:21: undefined reference to `Heap::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