cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : UNIX/Linux Programming : Symbol definition confusion
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Articles
Lounge
Jobs

-

question  Symbol definition confusion

daviddoria
I have a bunch of files that I would like to combine into a library. In the makefile I have

1
2
libgeom.a: geom_Point.o geom_Vector.o geom_Matrix.o geom_Line.o geom_Edge.o geom_Plane.o geom_Polygon.o geom_Display.o geom_Geometry.o
        ar crs $@ $^


it seems to work fine. However, when I try to use the library I get an undefined symbol. When I run nm on it, it seems like there is a symbol that is undefined 3 times and defined once???

1
2
3
4
5
nm libgeom.a | grep VectorC1Eddd
         U _ZN11geom_VectorC1Eddd
         U _ZN11geom_VectorC1Eddd
         U _ZN11geom_VectorC1Eddd
00000046 T _ZN11geom_VectorC1Eddd


I don't understand how that could be? Am I interpreting this output incorrectly?

Thanks!

Dave
|

Registered users can reply in this forum.
Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us