Hello,

I have installed the scenegraph 1.8.0 alpha from the daily build ,not
sure though if it is properly installed as i have got several errors
while making it.

but after running the sudo make install and setting the LD_LIBRARY_PATH
i got the following output with osg-config

[EMAIL PROTECTED]:~/openSG/opSG$ osg-config
Usage: osg-config OPTIONS [LIBRARIES]
Options:
    [--prefix[=DIR]]
    [--exec-prefix[=DIR]]
    [--version]
    [--compiler]
    [--compiler-id]
    [--moc]
    [--uic]
    [--moc4]
    [--uic4]
    [--exe-linker]
    [--libs]
    [--cflags]
    [--lflags]
    [--llibs]
    [--opt]
    [--dbg]
Libraries:
    Base
    System
    Win32
    X
    GLUT
    QT
    QT4
    Sepia
    Contrib



and




[EMAIL PROTECTED]:~/openSG/opSG$ osg-config --libs --dbg Base System
GLUT QT
-g -L/usr/lib64/ -L/usr/lib64/ -L/usr/lib64/ -L/usr/share/qt3/lib/
-L/usr/lib64/ -L/usr/local/lib/dbg -lOSGWindowQT -lOSGWindowGLUT
-lOSGWindowX -lOSGSystem -lOSGBase -ltiff -ljpeg -lpng -lz -lqt-mt
-lglut -lGLU -lGL -lXmu -lXi -lXt -lX11 -lpthread -ldl -lm
-L/usr/X11R6/lib64


and 


[EMAIL PROTECTED]:~/openSG/opSG$ osg-config --cflags --dbg Base
System GLUT QT
-D_GNU_SOURCE -DQT_CLEAN_NAMESPACE -DOSG_WITH_GLUT -DOSG_WITH_QT
-DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG -D_OSG_HAVE_CONFIGURED_H_
-DQT_NO_XINERAMA -DQT_NO_XRENDER -DQT_NO_XFTFREETYPE -DQT_NO_XKB
-DQT_NO_SM_SUPPORT -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG
-DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC -DQT_NO_STYLE_INTERLACE
-DQT_NO_STYLE_COMPACT -ansi -use_readonly_const -ftemplate-depth-100
-fPIC -O1 -g -DOSG_DEBUG -DOSG_WITH_QT -DOSG_WITH_GLUT -DOSG_WITH_TIF
-DOSG_WITH_JPG -DOSG_WITH_PNG -I/usr/include/ -I/usr/include/
-I/usr/include/ -I/usr/include/qt3/ -I/usr/include/GL/ -I/usr/local/include


Does that mean  it is properly installed?


Then i prepared a MakeFile and my first application (copied the code
from the site)



but got the following error:


[EMAIL PROTECTED]:~/openSG/opSG$ make firstScene
"g++" -c -D_GNU_SOURCE -DQT_CLEAN_NAMESPACE -DOSG_WITH_GLUT
-DOSG_WITH_QT -DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG
-D_OSG_HAVE_CONFIGURED_H_ -DQT_NO_XINERAMA -DQT_NO_XRENDER
-DQT_NO_XFTFREETYPE -DQT_NO_XKB -DQT_NO_SM_SUPPORT -DQT_NO_IMAGEIO_MNG
-DQT_NO_IMAGEIO_JPEG -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_MAC
-DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_COMPACT -ansi -use_readonly_const
-ftemplate-depth-100 -fPIC -O1 -g -DOSG_DEBUG -DOSG_WITH_GLUT
-DOSG_WITH_TIF -DOSG_WITH_JPG -DOSG_WITH_PNG -I/usr/include/
-I/usr/include/ -I/usr/include/ -I/usr/include/GL/ -I/usr/local/include
firstOSG.cpp
"g++" -o  firstScene firstOSG.o -g -L/usr/lib64/ -L/usr/lib64/
-L/usr/lib64/ -L/usr/lib64/ -L/usr/local/lib/dbg -lOSGWindowGLUT
-lOSGSystem -lOSGBase -ltiff -ljpeg -lpng -lz -lglut -lGLU -lGL -lXmu
-lXi -lXt -lX11 -lpthread -ldl -lm -L/usr/X11R6/lib64
/usr/bin/ld: cannot find -lOSGWindowGLUT
collect2: ld returned 1 exit status
make: *** [firstScene] Error 1



what did i miss ?


I am attaching the source code and MakeFile .



Sajjad



Attachment: Makefile
Description: Binary data

// File : 01firstapp.cpp
//what follows here is the smallest OpenSG programm possible
//most things used here are explained now or on the next few pages, so don’t
//worry if not everything is clear right at the beginning...
//Some needed include files - these will become more, believe me ;)
#include <OpenSG/OSGConfig.h>
#include <OpenSG/OSGGLUT.h>
#include <OpenSG/OSGSimpleGeometry.h>
#include <OpenSG/OSGGLUTWindow.h>
#include <OpenSG/OSGSimpleSceneManager.h>
//In most cases it is useful to add this line, otherwise every OpenSG command
//must be preceeded by an extra OSG::
OSG_USING_NAMESPACE
//The SimpleSceneManager is a useful class which helps us to
//manage simple configurations. It will be discussed in detail later on



SimpleSceneManager *mgr;
//we have a forward declaration here, just to have a better order
//of codepieces
int setupGLUT( int *argc, char *argv[] );


int main(int argc, char **argv)
{
    // Init the OpenSG subsystem
    osgInit(argc,argv);
    // We create a GLUT Window (that is almost the same for most applications)
    int winid = setupGLUT(&argc, argv);
    GLUTWindowPtr gwin= GLUTWindow::create();
    gwin->setId(winid);
    gwin->init();
    // This will be our whole scene for now : an incredible torus
    NodePtr 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();
    // Give Control to the GLUT Main Loop
    glutMainLoop();
    return 0;
}






// react to size changes
void reshape(int w, int h)
{
    mgr->resize(w, h);
    glutPostRedisplay();
}
// just redraw our scene if this GLUT callback is invoked
void display(void)
{
    mgr->redraw();
}
//The GLUT subsystem is set up here. This is very similar to other GLUT
//applications. If you have worked with GLUT before, you may have the
//feeling of meeting old friends again, if you have not used GLUT before
//that is no problem. GLUT will be introduced briefly on the next section
int setupGLUT(int *argc, char *argv[])
{
    glutInit(argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
    int winid = glutCreateWindow("OpenSG First Application");
    // register the GLUT callback functions
    glutDisplayFunc(display);
    glutReshapeFunc(reshape);
    return winid;
}

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to