On 05/09/2011 07:46 AM, Gerrit Voß wrote: > Hi. > > On May 9, 2011, at 19:59, Andres Ussa Caycedo<ac...@msn.com> wrote: > > >> On 05/09/2011 02:36 AM, Gerrit Voß wrote: >> >>> Hi, >>> >>> On Mon, 2011-05-09 at 02:08 -0500, Andres Ussa Caycedo wrote: >>> >>> >>>> On 05/09/2011 01:43 AM, Gerrit Voß wrote: >>>> >>>> >>>>> Hi, >>>>> >>>>> >>>>> >>>> Ok, thank you so much, that worked perfectly, now, the linking totally >>>> failed... it could not find anything... :S >>>> >>>> here is the pastebin: >>>> >>>> http://pastebin.com/TsvWsGYp >>>> >>>> Where did I mess up? >>>> >>>> Should I recompile OpenSG and inVRs? >>>> >>>> >>> that should not be necessary. It looks like the linker just does >>> not know where to find the OpenSG libraries, the easiest way to >>> tell him without modifying the cmake system is to set LD_LIBRARY_PATH >>> so that it includes the OpenSG library installation directory. For >>> example if you had OpenSG installed in /home/andres/OpenSG you would >>> do >>> >>> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/andres/OpenSG/lib >>> >>> to point to the OpenSG libraries. Adjust the path according to your >>> installation, you need it to run the example anyway. >>> >>> (side note, if LD_LIBRARY_PATH is not set you can leave out the first >>> ${LD...}: part) >>> >>> kind regards >>> gerrit >>> >>> >> Hi, where should I add that? I put it in the .cpp file, at the top of >> it, and this is what I got: >> > that was meant for the shell from which you call make. Once before > you call make. > > >> I suppose I'm doing it wrong... and also, I know it is a silly question, >> but how do I know where the OpenSG/lib folder was created... I did a >> default build of OpenSG, don't quite know where it is... :S >> > IIRC either in the build directory inside the install subdirectory or under > /usr/local/lib. > Haven't build 1.x for a while. > > try something like > > find /usr/local | grep -i osgbase > > or instead of /usr/local your OpenSG source directory. That should show > where libOSGBase.so is located (if inside either dir) > > kind regards > gerrit > 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 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 What is the problem now? :S Thank you. ------------------------------------------------------------------------------ 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