This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined reference to 'class::function' error


Kevin,

"Please do not Cc: me" meant that all communication should go to the list
(hence the Reply-To:) and that I will read your messages on the list.
Please do not send personal e-mail with Cygwin questions unless
specifically requested.  All Cygwin questions (and answers, hopefully)
should go to the Cygwin list -- the questions to address a larger
audience, and the answers to help others avoid asking the same questions
over and over.
	Igor

On Fri, 10 Oct 2003, Kai Xu (Kevin) wrote:

> Yes, indeed! I get it working and thank you so much! That's what I used to
> do when program c++ under windows, but seems not the right way for UNIX. I
> will send email to list after this one :-)
>
> Kevin
>
> ----- Original Message -----
> From: "Igor Pechtchanski" <pechtcha@cs.nyu.edu>
> To: "Kai Xu (Kevin)" <kaixu@itee.uq.edu.au>
> Cc: <cygwin@cygwin.com>
> Sent: Friday, October 10, 2003 10:57 AM
> Subject: Re: undefined reference to 'class::function' error
>
>
> > Kevin,
> >
> > Please don't Cc: me, I read the list (I set the Reply-To: for a reason).
> > More below.
> >
> > On Fri, 10 Oct 2003, Kai Xu (Kevin) wrote:
> >
> > > 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
> >
> > Aha, so you aren't linking the file in.  This is a general C/C++ question,
> > not Cygwin specific, and thus off-topic for this list.  For more details,
> > read up on "separate compilation" and "multiple source files" in any C/C++
> > book.  For a short term solution, simply add the cpp file that defines the
> > missing function to the compile command, but if you need further help on
> > similar issues, please try a C/C++ user support list/newsgroup or read
> > an intro to programming book.
> > Igor

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]