Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 2002 17:32:02 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Mike McGranahan <mikemcg@ucla.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: undefined references
Message-ID:  <20021127153202.GC609@gothmog.gr>
In-Reply-To: <004601c29627$ab245090$1a00a8c0@HOME>
References:  <004601c29627$ab245090$1a00a8c0@HOME>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-11-27 07:14, Mike McGranahan <mikemcg@ucla.edu> wrote:
> i am trying to compile c++ code originally compiled on msvc++ on
> freebsd-4.6.2-release.  i'm relatively new to freebsd, and this is
> my first attempt at coding on this platform.  there are three source
> files, all of which compile.  however, when i try to link them
> together, i get undefined references and other errors, such as
>
> retrquote.o: In function `main':
> retrquote.o(.text+0x27): undefined reference to `endl(ostream &)'
> retrquote.o(.text+0x34): undefined reference to `cerr'
> retrquote.o(.text+0x39): undefined reference to `ostream::operator<<(char const *)'
> retrquote.o(.text+0x44): undefined reference to `ostream::operator<<(ostream &(*)(ostream &))'

Are you using `cc' as the compiler or `c++'?
You should really use the second.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021127153202.GC609>