OSG Applications Compile and Execute


  • Use Visual Studio 2005 (install service pack 1)

    • Add New Project for “Win32 Console Application”
    • Click next on application wizard, and then check “empty project” in additional options

  • Add the following path to the Additional Include Directories (Project Properties -> Configuration Properties -> C/C++ ->General -> Additional Include Directories)

    • $(OSG_ROOT)\include

  • Similarly, set the linker directory to the following

    • $(OSG_ROOT)\lib

  • And add the libraries to the input option of the linker setting

    • Release Mode: osgViewer.lib osgDB.lib osgUtil.lib osg.lib OpenThreads.lib opengl32.lib glu32.lib
    • Debug Mode: osgViewerd.lib osgDBd.lib osgUtild.lib osgd.lib OpenThreadsd.lib opengl32.lib glu32.lib

  • Finally, run your OSG application

Leave a Reply

Your email address will not be published. Required fields are marked *