sorry, I was too fast. The changes I did to the code resulted in
segmentation fault. Anyway, back to the topic;
this is the compile output;
/usr/local/include/OpenSG/OSGSimpleSceneManager.h:163:5: error:
‘OSG::SimpleSceneManager::SimpleSceneManager()’ is protected
test.cpp:46:19: error: within this context
This is the code (copied straight from the wiki);
{
// We create a GLUT Window (that is almost the same for most
applications)
int winid = setupGLUT(&argc, argv);
GLUTWindowRecPtr gwin = GLUTWindow::create();
gwin->setGlutId(winid);
gwin->init();
// This will be our whole scene for now : an incredible torus
NodeRecPtr scene = makeTorus(.5, 2, 16, 16);
// Create and setup our little friend - the SSM
mgr = new SimpleSceneManager;
mgr->setWindow(gwin);
mgr->setRoot(scene);
mgr->showAll();
}
and this is the command to compile;
g++ -c -g -Wall -fPIC -I/usr/local/opensg/include/OpenSG -lOSGBase
-lOSGSystem -lOSGWindowGLUT -lOSGDrawable -lOSGUtil -lOSGText -lOSGWindow
-lOSGGroup -lOSGState -lOSGWindowX -ldl -lpthread -lboost_filesystem-mt
-lboost_system-mt -lz -lGL -lGLU -lglut -lXmu -lXi -lfreetype -lfontconfig
-lX11 test.cpp
Thanks.
Best regards,
Faizol
On Wed, Oct 3, 2012 at 6:17 AM, Muhamad Faizol Abd. Halim <
faizol....@gmail.com> wrote:
> That solved it! Many thanks.
>
> Btw, is there any book recommendation on OpenSG?
>
> Also regarding the tutorials, is there someone in charge of updating it? I
> can spend some time helping out if there's any need to update the
> documentation, but considering that I'm such a noob wrt OpenSG, I can only
> help if there's someone supervise it.
>
> Again, many thanks for the pointer, really appreciate it.
>
> Best regards,
> Faizol
>
>
> On Wed, Oct 3, 2012 at 6:00 AM, Carsten Neumann
> <carsten_neum...@gmx.net>wrote:
>
>> Hello Faizol,
>>
>> On 10/02/2012 04:43 PM, Muhamad Faizol Abd. Halim wrote:
>> > I copied the code from the tutorial on the wiki page;
>> > int main(int argc, char **argv)
>> > {
>> > OSG::osgInit(argc,argv);
>> >
>> > {
>> > int winid = setupGLUT(&argc, argv);
>> > OSG::GLUTWindowRecPtr gwin = OSG::GLUTWindow::create();
>> > gwin->setGlutId(winid);
>> > gwin->init();
>> >
>> > scene = createScenegraph();
>> >
>> > mgr = OSG::SimpleSceneManager::create();
>> > mgr->setWindow(gwin );
>> > mgr->setRoot (scene);
>> > mgr->showAll();
>> > }
>> >
>> > glutMainLoop();
>> >
>> > return 0;
>> > }
>> >
>> > and here's the output;
>> > /opensg/test/test2.cpp:41: undefined reference to
>> > `OSG::SimpleSceneManager::create()'
>> > collect2: error: ld returned 1 exit status
>>
>> hmm, that's a very different error now?
>>
>> > the gcc command;
>> > g++ -g -Wall -fPIC -I/usr/local/opensg/include/OpenSG -lOSGBase
>> > -lOSGSystem -lOSGWindowGLUT -lOSGDrawable -lOSGGroup -lOSGState
>> > -lOSGWindowX -ldl -lpthread -lboost_filesystem-mt -lboost_system-mt -lz
>> > -lGL -lGLU -lglut -lXmu -lXi -lX11 test2.cpp -L/usr/local/opensg/lib64
>> > -lOSGBase -lOSGSystem -lOSGWindowGLUT -lOSGDrawable -lOSGGroup
>> > -lOSGState -lOSGWindowX -ldl -lpthread -lboost_filesystem-mt
>> > -lboost_system-mt -lz -lGL -lGLU -lglut -lXmu -lXi -lX11 -o test2
>>
>> SimpleSceneManager is in libOSGUtil, you need to link with it, i.e. add
>> a -lOSGUtil to the linker command.
>>
>> Cheers,
>> Carsten
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>> _______________________________________________
>> Opensg-users mailing list
>> Opensg-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/opensg-users
>>
>
>
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users