"Amar Dinsa" writes: > Hi, > > I'm interested in using OSG for a project but am having difficulty compiling > the example applications. I am running Ubuntu linux and installed the > binaries through the package manager and also built the source. I am able to > run the osgversion command as the OSG Quick Start Guide instructs but cannot > compile an example program. > > For example, to compile the sample "osglogo" program, I try running the > command: > > Code: > g++ -I/usr/local/include/ -L/usr/local/lib/ -losgViewer -losgDB -losgUtil > -losg osglogo.cpp >
Be careful — if you installed OSG through Ubuntu's package manager, OSG headers are installed in /usr/include, and libraries under /usr/lib. No need to mess with ld.so.conf, nor specify directories at compile time. Since you have those headers in /usr/local, I guess they are left from an older compilation from source. Don't mix them! In your case, you lack some libraries, specially the core one, -losg. Keep adding libraries -losgText,... until the link errors are gone. > > Which is what the Quick Start Guide says to do. I do indeed have the osg > header files in the /usr/local/include/osg* directories and library files in > /usr/local/lib/libosg*. > I also appended "/usr/local/lib" to my /etc/ld.so.conf file and ran ldconfig, > but I am still receiving this lengthy compiler message: > > Code: > /tmp/ccQ8pJfi.o: In function `createWing(osg::Vec3f const&, osg::Vec3f > const&, osg::Vec3f const&, float, osg::Vec4f const&)': [...] Regards, -- Alberto _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

