Mail Archives: cygwin/2010/01/29/20:49:31
I get two rather cryptic errors when I try to compile some of my own softwa=
re.=A0 In the first, the software links fine normally, but when I
try to add debug information with the -g switch, I get the following=20
error or something similar:
$ make
g++ -I/home/Petey/include=20
-Wno-deprecated -g=A0 -o model1 model1.cc -L/home/Petey/lib -ldataset-g=20
-lpetey -lsparse-g -lgsl -lgslcblas
/tmp/cc5e9G8Z.o: In function=20
`_ZN7datasetD0Ev':
/home/Petey/include/simple_temp.h:(.dtors+0x0):=20
undefined reference to `global destructors keyed to x_grid'
/home/Petey/lib/libdataset-g.a(simple_temp-g.o):
In function `_ZN6simpleIdEeqIdEEiRKS_IT_E':
/home/Petey/my_software/datasets/simple_temp.cpp:(.dtors+0x0):
undefined reference to `global destructors keyed to=20
_ZN6simpleIfE8set_typeEv'
collect2: ld returned 1 exit status
make:
*** [model1] Error 1
(I create multiple versions of the=20
libraries by appending the optimization flag, e.g. -g, -O2 etc.)
The
second error, and the simpler-looking of the two, is as follows:
g++
-I/home/Petey/include -Wno-deprecated -O2=A0 -o model2 model2.cc=20
traj_int_obj.o tcoord_defs.o -L/home/Petey/lib -ldataset-O2 -lpetey=20
-lsparse-O2 -lgsl -lgslcblas
model2.cc: In function `int main(int,=20
char**)':
model2.cc:140: warning: converting to `long int' from=20
`double'
traj_int_obj.o:traj_int_obj.cc:(.text+0x12): undefined=20
reference to `_mcount'
traj_int_obj.o:traj_int_obj.cc:(.text+0x6f):=20
undefined reference to `_mcount'
traj_int_obj.o:traj_int_obj.cc:(.text+0x165):
undefined reference to `_mcount'
traj_int_obj.o:traj_int_obj.cc:(.text+0x212):
undefined reference to `_mcount'
traj_int_obj.o:traj_int_obj.cc:(.text+0x382):
undefined reference to `_mcount'
traj_int_obj.o:traj_int_obj.cc:(.text+0x702):
more undefined references to `_mcount' follow
There is no variable=20
or function called "mcount" in traj_int_obj.cc.=A0 The only external=20
header I use is stdio.h so it must be somehow connected.
Any help
anyone could offer would be greatly appreciated.
Regards,
Peter
Peter Mills
Maverick scientist and software developer
http://sourceforge.net/users/peteysoft/
-Innovative, original and efficient numerical algorithms
http://libagf.sourceforge.net/
-Fast, simple and accurate statistical classification.
=20=09=09=20=09=20=20=20=09=09=20=20
_________________________________________________________________
Reinvent how you stay in touch with the new Windows Live Messenger.
http://go.microsoft.com/?linkid=3D9706116
--
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
- Raw text -