Hi, On Mon, 2011-05-09 at 01:07 -0500, Andres Ussa Caycedo wrote: > On 05/08/2011 10:16 PM, Gerrit Voß wrote: > > Hello, > > > > On Sun, 2011-05-08 at 21:11 -0500, Andres Ussa Caycedo wrote: > > > >> > >> previous solved issue, with the difference that my OS is debian amd64, I > >> tried to add 'OSG_WITH_GLUT' to the .cpp, but depending on where I put > >> it, I get new errors, exactly where should it be? > >> > > for 1.x best on the compiler command line (where it is for the main > > OpenSG build). Just add -DOSG_WITH_GLUT when compiling the source. > > > > Without seeing the new errors it is hard to tell what might go wrong, > > are these OpenSG errors or system errors, e.g. "can't find GL/glut.h" > > followed by missing declarations from glut ? > > > > kind regards > > gerrt > > > > > Hi, do you want me to add "-DOSG_WITH_GLUT" to the command in which I > compile OpenSG or when I compile MedievalTown.cpp?
to your build system, usually somewhere inside your build system (for example make, cmake, scons) you have the possibility to add user defines. > I get the new errors when I add "OSG_WITH_GLUT" inside the .cpp, I don't > even know if that is the right way to do it... i.e.: > > I get this when I add that to line 29, just before "OSG_USING_NAMESPACE" > > /home/andres/inVRs_OSG/tutorials/MedievalTown/src/MedievalTown.cpp:30: > error: expected constructor, destructor, or type conversion before > ‘namespace’ > /home/andres/inVRs_OSG/tutorials/MedievalTown/src/MedievalTown.cpp: In > function ‘int main(int, char**)’: > /home/andres/inVRs_OSG/tutorials/MedievalTown/src/MedievalTown.cpp:78: > error: ‘GLUTWindowPtr’ was not declared in this scope > /home/andres/inVRs_OSG/tutorials/MedievalTown/src/MedievalTown.cpp:78: > error: expected ‘;’ before ‘gwin’ > /home/andres/inVRs_OSG/tutorials/MedievalTown/src/MedievalTown.cpp:79: > error: ‘gwin’ was not declared in this scope that looks more like you just added OSG_WITH_GLUT instead of #define OSG_WITH_GLUT 1 to your code. In general the define should be set before any includes are done, so line 1 would be a preferred choice, latest should be before the main OpenSG includes start (line 5) kind regards gerrit ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users