Ah this looks like it might be it, using that ldd command shows that " 
libosgDB.so.65 => /usr/local/lib/libosgDB.so.65 (0xb7c21000)" is being build, 
while the execution shows that "/usr/local/lib/osgPlugins-2.8.3/osgdb_osg.so" 
is being found. 

The Makefile which was created/generated by someone else had been left 
untouched by me since compiling and executing went fine. It currently looks 
like this (I added the "/osgPlugins-2.8.3" part just now, hoping that it would 
fix it, but the same error is given, ldd doesn't give different results 
either). 


Code:
OBJ = main.o Configuration.o support.o OsgObject.o Lights.o Cameras.o EsimIf.o 
TransformAccumulator.o 

SOURCES=*.cc
Header=*.h
LIBS= -losg -losgDB -losgGA -losgUtil -losgViewer 
-L/usr/local/lib/osgPlugins-2.8.3 -lz -lpthread  -lm -lrt -L/usr/Project/lib 
-lesClient
CPPFLAGS= -g -I. -D__STRICT_ANSI__ -I/usr/local/include -I/usr/Project/include 
-I/usr/Project/include/esim

all: $(OBJ)
        g++ -o execu $(OBJ) $(LIBS)

clean:
        rm -f *.o
        rm -f execu

%.o: %.cc
        g++ $(CPPFLAGS) -c $< -o $*.o











hybr wrote:
> Hi, Mark
> 
> This is probably building\linking issue. Either you build with includes from 
> one osg version and linking to other, or something along these lines
> Check if you are building with includes from same osg version as you linking 
> to, and running with same libs, you linking with(you can get libraries which 
> will be used on program start with "ldd <program>"). 
> To get backtrace you should run your program with gdb
> "gdb --args <program and arguments>"
> type run
> and type bt when it crashes
> 
> 16.03.2012, 13:35, "Mark Green" <>:
> 
> > Hi Robert,
> > 
> > I'm working on linux, and with my limited experience on it I'm unaware how 
> > to obtain said stacktrace (Visual Studio has been too awesome on windows).
> > 
> > Meanwhile however I've stripped the entire program down to the bare minimum 
> > to see if there were any influences from other code, and this is what I've 
> > got now and which is giving me the same segmentation fault. Other classes 
> > are still being compiled but they are never referenced or called, and 
> > building it is going fine.
> > 
> > Code:
> > 
> > #include <iostream>
> > #include <string>
> > #include <osgDB/ReadFile>
> > using namespace std;
> > 
> > int main( int argc, char **argv )
> > {
> >         string s = "/home/username/OSG-Project/cow.osg";
> >         std::cout << " test" << s << std::endl;
> >           osg::ref_ptr<osg::Node> Scene = osgDB::readNodeFile(s);
> >         std::cout << " test2 " << std::endl;
> >   return 0;
> > }
> > 
> > Cheers,
> > Mark
> > 
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=46337#46337
> > 
> > _______________________________________________
> > osg-users mailing list
> > 
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46340#46340





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to