Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <02af01c38ec7$9c29d850$db406682@itee.uq.edu.au> Reply-To: "Kai Xu \(Kevin\)" From: "Kai Xu \(Kevin\)" To: Cc: References: <028301c38e65$3d4a5ab0$db406682 AT itee DOT uq DOT edu DOT au> <028901c38e6a$a028eca0$db406682 AT itee DOT uq DOT edu DOT au> Subject: Re: undefined reference to 'class::function' error Date: Fri, 10 Oct 2003 10:44:06 +1000 Organization: ITEE, The Univeristy of Queensland MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Checked: This message probably not SPAM X-Spam-Score: -1 X-Spam-Tests: QUOTED_EMAIL_TEXT,REFERENCES X-Spam-Report: -1.00 points, 8 required; * -0.5 -- Has a valid-looking References header * -0.5 -- BODY: Contains what looks like a quoted email text X-Scanned-By: MIMEDefang 2.35 Note-from-DJ: This may be spam As I am not good at c++, I am not sure what you mean by "link the file that defines this function into the resulting executable". I just include the .h file that defines the function in the main .cpp file. The compile command I used is: g++ sp.cpp (the main cpp file) I guess there could be some problem here. Kevin ----- Original Message ----- From: "Igor Pechtchanski" To: "Kai Xu (Kevin)" Cc: Sent: Thursday, October 09, 2003 11:53 PM Subject: Re: undefined reference to 'class::function' error > On Thu, 9 Oct 2003, Kai Xu (Kevin) wrote: > > > I guess I can only post a example of the errors here, as the main program is > > about 2k lines and compiler doesn't tell where the error occurs. > > > > I am not good at c++ and this is not my program, so please let me know > > if I am not posting the right thing or anything is missing. > > > > Cheers, > > Kevin > > > > The error message: > > undefined reference to `NList::insert(Cone*, double, int)' > > [snip] > > Ok, so it's a linking error. Is the file that defines this function > linked into the resulting executable? Can you please post the exact > command used to invoke the compiler to link the final executable? > Igor > -- > http://cs.nyu.edu/~pechtcha/ > |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu > ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com > |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. > '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! > > "I have since come to realize that being between your mentor and his route > to the bathroom is a major career booster." -- Patrick Naughton > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/