Hello Stefan,

Stefan Heyer wrote:
> Dear Ladies and gentleman,
> 
> I have installed your OpenSG in the version 1.8.0. 1. Now I want to 
> start running your program 01firstapp.cpp in eclipse in linux debian. So 
> I have startet there a new managed c++ project and have include the file 
> 01firstapp.cpp in this project. In the compiler options I have include 
> the subdirectory GLUT. If I start then the cimpiling of your program I 
> get the following error message

hm, I don't use eclipse, so I can't give you a detailed description of 
what you have to do in there. I'll try to describe the general steps in 
the hope that you can then make the correct settings inside eclipse.
However, it might be easier to just use the Makefile that comes with the 
tutorial programs in Doc/tutorial/progs (see below for what it does).

> **** Build of configuration Debug for project testOpenSG ****
> 
> make -k all Building file: ../firstapp.cpp
> Invoking: GCC C++ Compiler
> g++ 
> -I/home/sheyer/Desktop/Home/Programme/OpenSG/OpenSG/Source/WindowSystem/GLUT 
> -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"firstapp.d" 
> -MT"firstapp.d" -o"firstapp.o" "../firstapp.cpp"
> ../firstapp.cpp: In function ‘int main(int, char**)’:
> ../firstapp.cpp:30: error: ‘GLUTWindowPtr’ was not declared in this scope
> ../firstapp.cpp:30: error: expected `;' before ‘gwin’
> ../firstapp.cpp:31: error: ‘gwin’ was not declared in this scope
> make: *** [firstapp.o] Fehler 1
> make: Das Target »all« wurde wegen Fehlern nicht aktualisiert.
> Build complete for project testOpenSG
> 
> Please can you tell me what I have do wrong, so that the program is 
> running.

In general to compile a program that uses OpenSG the compiler must be 
able to find the installed headers and libraries. Additionally some 
preprocessor macros need to be defined to select optional features.
To simplify this there is the osg-config tool which basically emits the 
correct compiler options (that's what the tutorial Makefile uses).
To make this work in an IDE like eclipse, I would look at the output of 
that tool and make the corresponding settings in the dialogs, i.e. for 
all the -Dsomething options there should be a dialog to set preprocessor 
defines.

osg-config --cflags --dbg Base System GLUT

osg-config --libs --dbg Base System GLUT

gives you the options for compiling and linking respectively.


        Hope it helps,
                Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to