Hey, I am following the OSGART tutorial and am trying to write my first OSG / 
OSGART app.
it says this is the Code for a simple empty Viewer Window:

Code:
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
int main(int argc, char* argv[]) {
// Create a viewer
osgViewer::Viewer viewer;
// Create a root node
osg::ref_ptr<osg::Group> root = new osg::Group;
// Attach root node to the viewer
viewer.setSceneData(root.get());
// Add relevant event handlers to the viewer
viewer.addEventHandler(new osgViewer::StatsHandler);
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
viewer.addEventHandler(new osgViewer::ThreadingHandler);
viewer.addEventHandler(new osgViewer::HelpHandler);
// Run the viewer and exit the program when the viewer is closed
return viewer.run();
}



But when I try to build that I get an Error: Fatal Error C1010 Unexpected End 
of File while searching for the precompiled header file (translated from 
German, so the English Error maybe slightly different)
When I turn off the precompiled Header File Option (Properties -> C++ -> 
precompiled Header files  or something like that) the error changes and it says 
it cant find the File "Config"... somehow I think VS is missing some Info for 
header files or something...?
I am fairly new to C++ (only have Java Experience up until now, but I am trying 
to buff up on my C++) and am new to OSG as well, so I hope this isnt a dumb 
question, but what do I need to do?

Does the Code look okay? I am kind of lost here  :-* 
Thanks for the help,
David

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15530#15530





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to