This is the mail archive of the cygwin 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: Problems linking--"undefined reference to..."


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


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