Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Installation and building / g++ link undefined references error?

g++ link undefined references error?

g++ link undefined references error?
Charles Bradshaw 2012/09/29 00:03
Building occ undet Fedora 17

Does anybody know why this make error occurs:

/home/brad/work/occ/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getScanLine(unsigned int) const'
/home/brad/work/occ/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned int, unsigned int, unsigned int)'

The errant g++ line is:

g++ -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -o .libs/DRAWEXE DRAWEXE.o -lstdc++ ../TKDraw/.libs/libTKDraw.so -L/usr/lib /home/brad/work/occ/adm/make/TKMesh/.libs/libTKMesh.so /home/brad/work/occ/adm/make/TKService/.libs/libTKService.so /home/brad/work/occ/adm/make/TKHLR/.libs/libTKHLR.so ../TKMesh/.libs/libTKMesh.so ../TKTopAlgo/.libs/libTKTopAlgo.so ../TKHLR/.libs/libTKHLR.so /home/brad/work/occ/adm/make/TKTopAlgo/.libs/libTKTopAlgo.so /home/brad/work/occ/adm/make/TKGeomAlgo/.libs/libTKGeomAlgo.so ../TKGeomAlgo/.libs/libTKGeomAlgo.so /home/brad/work/occ/adm/make/TKBRep/.libs/libTKBRep.so ../TKGeomBase/.libs/libTKGeomBase.so ../TKG2d/.libs/libTKG2d.so ../TKBRep/.libs/libTKBRep.so /home/brad/work/occ/adm/make/TKGeomBase/.libs/libTKGeomBase.so /home/brad/work/occ/adm/make/TKG3d/.libs/libTKG3d.so ../TKMath/.libs/libTKMath.so ../TKG3d/.libs/libTKG3d.so /home/brad/work/occ/adm/make/TKG2d/.libs/libTKG2d.so ../TKernel/.libs/libTKernel.so ../TKService/.libs/libTKService.so /home/brad/work/occ/adm/make/TKMath/.libs/libTKMath.so /home/brad/work/occ/adm/make/TKernel/.libs/libTKernel.so -lrt -ltcl8.5 -ltk8.5 -ltbb -ltbbmalloc -lXt -lX11 -lXmu -lfreeimageplus -ldl -lpthread -Wl,-rpath -Wl,/home/brad/lib

In which -lfreeimage occours after libTKSevice.so

Both fipImage::getScanLine and fipImage::fipImage are present in /usr/lib/libfreeimageplus.so

$ nm -D /usr/lib/libfreeimageplus.so
..
00005490 T _ZNK8fipImage11getScanLineEt
..
00004bf0 T _ZN8fipImageD1Ev

The symbols are both correctly flagged U in libTKService.so, although I am unclear as to how libTKService.so is compiled and linked!

Changing the g++ line to specifically link libfreeimageplus.so using /usr/lib/libfreeimageplus.so in place of -lfreeimage produces the identical error.

I'm completely baffled! Can suggest a solution?
Charles Bradshaw 2012/09/29 00:20
EDit:-
I've just discovered the -C switch to nm with the result that:

$ nm -DC /usr/lib/libfreeimageplus.so | grep getScanLine
00005490 T fipImage::getScanLine(unsigned short) const

$ [brad@p2800 lib]$ nm -DC /usr/lib/libfreeimageplus.so | grep fipImage::fipImage
00004d60 T fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short)

In which I note that unsigned short is specified whereas unsigned int is required.

Is this the problem? If so where is the source for TKService so I can patch it?

 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map