Hi Peter,

unfortunatelly I did not manage to make your code run. I am getting this Link 
Errors:
error LNK2001: unresolved external symbol __imp__glEnableClientState@4
error LNK2001: unresolved external symbol __imp__glDisableClientState@4

Find my includes bellow, according to me, it should work with including 
osg/state. Wrong ?
Moreover, why are you using glEnableClientState ? Is glEnable not the right one 
?
In any case both variations give me this link error, while in a non osg App the 
primitive restart is working ( with glew.h ).

The above errors are not compile errors, they are link errors as you noted yourself, so they have nothing to do with what your code is including, but with what your program is linking to.

You need to link to opengl32.lib or -lGL for gcc.

The reason why this didn't matter before, I suspect, is because in your own code you didn't do any pure OpenGL calls until now. The OSG libs/DLLs already link to OpenGL, so they were fine, and your program only called OSG, so it didn't need to link to OpenGL itself. Now you've put code in your own program that calls OpenGL functions, so you need it to link to OpenGL directly.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                    http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to