This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problems linking--"undefined reference to..."
- From: Greg Chicares <gchicares at sbcglobal dot net>
- To: cygwin at cygwin dot com
- Date: Sat, 30 Jan 2010 02:42:36 +0000
- Subject: Re: Problems linking--"undefined reference to..."
- References: <BAY127-W1749E0512E2F4772BE7B7EC55A0@phx.gbl>
On 2010-01-30 01:49Z, Peter Mills wrote:
>
> g++
> -I/home/Petey/include -Wno-deprecated -O2 -o model2 model2.cc
> traj_int_obj.o tcoord_defs.o -L/home/Petey/lib -ldataset-O2 -lpetey
> -lsparse-O2 -lgsl -lgslcblas
> model2.cc: In function `int main(int,
> char**)':
[...]
> traj_int_obj.o:traj_int_obj.cc:(.text+0x12): undefined
> reference to `_mcount'
'_mcount' is used by gprof. If an object file was built with '-pg',
then you need to use '-pg' for linking, too.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple