Hi,

On Mon, 2011-05-09 at 21:55 -0500, Andres Ussa Caycedo wrote:
> >    
> Hi, this is what I got by:
> 
> find /usr/local | grep -i osgbase
> 
> /usr/local/lib/dbg/libOSGBase.so
> /usr/local/include/OpenSG/OSGBaseFunctions.h
> /usr/local/include/OpenSG/OSGBaseTypeTraits.h
> /usr/local/include/OpenSG/OSGBaseThread.h
> /usr/local/include/OpenSG/OSGBaseTypes.h
> /usr/local/include/OpenSG/OSGBase.h
> /usr/local/include/OpenSG/OSGBaseFunctions.inl
> /usr/local/include/OpenSG/OSGBaseFieldDataType.h
> 
> So I suppose the inVRs lib folder is /usr/local/lib/dbg/, so this is how my 
> bash file ended up:
> 
> #!/bin/sh
> A=`find build -name 'Makefile'`
> if [ -z "$A" ]
> then
>    echo "Running CMake"
>    cd build
>    cmake ../
>    cd ..
> fi
> cd build
> export LD_LIBRARY_PATH=/usr/local/lib/dbg
> make

that looks ok.

> A lot of errors did not appear this time, but this is what I got:
> 
> Linking CXX executable MedievalTown
> CMakeFiles/MedievalTown.dir/src/MedievalTown.o: In function 
> `osg::GLUTWindowBase::getClassType()':
> MedievalTown.cpp:(.text._ZN3osg14GLUTWindowBase12getClassTypeEv[osg::GLUTWindowBase::getClassType()]+0x7):
>  undefined reference to `osg::GLUTWindowBase::_type'
> CMakeFiles/MedievalTown.dir/src/MedievalTown.o: In function 
> `osg::FCPtr<osg::FCPtr<osg::AttachmentContainerPtr, osg::Window>, 
> osg::GLUTWindow>  osg::FCPtr<osg::FCPtr<osg::AttachmentContainerPtr, 
> osg::Window>, 
> osg::GLUTWindow>::dcast<osg::FieldContainerPtr>(osg::FieldContainerPtr)':
> MedievalTown.cpp:(.text._ZN3osg5FCPtrINS0_INS_22AttachmentContainerPtrENS_6WindowEEENS_10GLUTWindowEE5dcastINS_17FieldContainerPtrEEES5_T_[osg::FCPtr<osg::FCPtr<osg::AttachmentContainerPtr,
>  osg::Window>, osg::GLUTWindow>  
> osg::FCPtr<osg::FCPtr<osg::AttachmentContainerPtr, osg::Window>, 
> osg::GLUTWindow>::dcast<osg::FieldContainerPtr>(osg::FieldContainerPtr)]+0x59):
>  undefined reference to `typeinfo for osg::GLUTWindow'
> collect2: ld returned 1 exit status
> make[2]: *** [MedievalTown] Error 1
> make[1]: *** [CMakeFiles/MedievalTown.dir/all] Error 2
> make: *** [all] Error 2

the problem seems to be that the build system does not link
against libOSGWindowGLUT.so. For this you have to change the
CMakeLists.txt file. Somewhere there should be something like
the following in there

target_link_libraries(MedievalTown
                      .
                      .
                      .
                      )
                      
listing the libraries linked to the executable. Try to add 
libOSGWindowGLUT.so to this list. There might be a difference
depending on the platform, e.g. something like IF(WIN32) so
you have to make sure it goes into the part active on unix 
platforms.

kind regards
  gerrit



------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to