To build the OpenSceneGraph code in Visual Studio, you normally must use the VisualStudio.sln solution file provided. The individual projects won't build as-is, because they depend on each other and only the VisualStudio.sln file provides those dependencies.
To create a program based on an example, probably the easiest way is to do this:
1. Copy the VisualStudio.sln project to a new file in the same directory
2. Copy the project you want to base your new project on to a new directory in the same level of the directory tree
3. Open the new .sln file you copied in step 1
4. Remove unneeded projects from it, but keep the core libraries (osg, osgDB, etc.). Shift-clicking to select a bunch of projects at once makes this easier to do
5. Add the new project to that solution
6. Set the dependencies for your new project. This is most easily done by opening the Solution Properties dialog, going to Project Dependencies, and checking off the libraries your project depends on
64 bit OpenSceneGraph and OpenThreads binaries can be built in Visual Studio 8, but several extra steps are required due to limits of the Visual Studio 6 project files:
a. Open the .dsw or .sln file and convert all projects to VS 8 format.
b. Open the Configuration Manager window under the Build menu, bring up the New Solution Platform window by selecting <New...> in the Active solution platform drop-down menu. Select x64 as the new platform and copy settings from Win32 (you need to have the x64 compiler installed to see the x64 platform option). Ensure the Create new project platforms checkbox is selected. Click OK, then close the Configuration Manager window.
c. Do a "Save All" to save the project files.
2. Visual Studio unfortunately chooses its own Output Directory setting for the x64 configurations in step 1.b., and this must be reset to the Win32 setting.
IF PERL _IS_ INSTALLED (native or Cygwin), do the following:
a. Close all Visual Studio solutions.
b. Open a command shell and cd to the OpenSceneGraph/VisualStudio directory.
c. Run the command "perl reset-64bit-outdirs.pl".
d. Reopen the solutions.
IF PERL _IS NOT_ INSTALLED, do the following to accomplish the same thing manually:
a. In the OpenThreads solution, open the properties window for the OpenThreads project.
i. Select multiple configurations, Debug and Release. Under the General page, overwrite the Output Directory path of the x64 platform with the corresponding Win32 path. For static builds, do the same thing for the Debug Static and Release Static configurations.