Hi guys,
I am a noob with graphics and 3d. I have some C++ experience but it has been
more than a year so this may make a little less sense than the average post.
I was trying to get familiar with OSG for a project and I tried to compile the
binaries and didn't have a clue of what I was doing.
Then I found this thread and Dwight's tutorial. Things started looking bright
and I went ahead and followed the steps in Dwight's tutorial.
I tried VS 2008 and after fighting with some problems decided to switch to VS
2005.
Having finished the steps I stumbled into some problems, fixed some of them(or
I think so, at least) but in the end it doesn't look like it worked a 100%.
First of all, it gives me 12 warnings but whenever I restart VS and compile/
build again they vanish.
So far so good.
The warnings look like this:
Code:
1>------ Build started: Project: OSGDefaultProject, Configuration: Debug Win32
------
1>Compiling...
1>Main.cpp
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(32) :
warning C4273: 'osgViewer::StatsHandler::StatsHandler' : inconsistent dll
linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(76) : see
previous definition of '{ctor}'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(51) :
warning C4273: 'osgViewer::StatsHandler::handle' : inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(101) : see
previous definition of 'handle'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(239) :
warning C4273: 'osgViewer::StatsHandler::updateThreadingModelText' :
inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(122) : see
previous definition of 'updateThreadingModelText'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(253) :
warning C4273: 'osgViewer::StatsHandler::reset' : inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(96) : see
previous definition of 'reset'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(260) :
warning C4273: 'osgViewer::StatsHandler::setUpHUDCamera' : inconsistent dll
linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(108) : see
previous definition of 'setUpHUDCamera'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(571) :
warning C4273: 'osgViewer::StatsHandler::createBackgroundRectangle' :
inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(110) : see
previous definition of 'createBackgroundRectangle'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(750) :
warning C4273: 'osgViewer::StatsHandler::createGeometry' : inconsistent dll
linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(112) : see
previous definition of 'createGeometry'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(906) :
warning C4273: 'osgViewer::StatsHandler::createFrameMarkers' : inconsistent dll
linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(114) : see
previous definition of 'createFrameMarkers'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(932) :
warning C4273: 'osgViewer::StatsHandler::createTick' : inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(116) : see
previous definition of 'createTick'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(959) :
warning C4273: 'osgViewer::StatsHandler::setUpScene' : inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(120) : see
previous definition of 'setUpScene'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(1519) :
warning C4273: 'osgViewer::StatsHandler::createCameraTimeStats' : inconsistent
dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(118) : see
previous definition of 'createCameraTimeStats'
1>c:\dev simar\osg\openscenegraph-2.8.0\include\osgviewer\statshandler(1646) :
warning C4273: 'osgViewer::StatsHandler::getUsage' : inconsistent dll linkage
1> c:\dev
simar\osg\openscenegraph-2.8.0\include\osgviewer\viewereventhandlers(104) : see
previous definition of 'getUsage'
1>Linking...
1>LINK : C:\Documents and Settings\Administrator\My Documents\Visual Studio
2005\Projects\OSGDefaultProject\Debug\OSGDefaultProject.exe not found or not
built by the last incremental link; performing full link
1> Creating library C:\Documents and Settings\Administrator\My
Documents\Visual Studio
2005\Projects\OSGDefaultProject\Debug\OSGDefaultProject.lib and object
C:\Documents and Settings\Administrator\My Documents\Visual Studio
2005\Projects\OSGDefaultProject\Debug\OSGDefaultProject.exp
1>Embedding manifest...
1>Build log was saved at "file://c:\Documents and Settings\Administrator\My
Documents\Visual Studio
2005\Projects\OSGDefaultProject\OSGDefaultProject\Debug\BuildLog.htm"
1>OSGDefaultProject - 0 error(s), 12 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
When there are no warnings and I run it a cmd window shows up(please see
attached image)..instead of seeing two colored pyramids as per Dwight's
tutorial.
When I go to my VS Solution and copy-paste my OSGDefaultProject.exe (my
executable) in the bin and run
Code:
OSGDefaultProject cow.osg
as opposed to
Code:
osgviewer cow.osg
the cow does show up.
Am I supposed to see the two pyramids without even mentioning any .osg file to
display?
To Dwight:
Your tut is immensely helpful but here's a few things that might improve it
1. The code for osgViewer.cpp that I copied into my Main.cpp refers to
statHandler, but there is no such file in the root\include\osgViewer folder so
I googled it, DLed it, removed the .cpp extension and threw it in and the error
went away.
2. There is a typo in step 11n "osgGAad.lib" is in fact, "osgGAd.lib"
Thanks,
Simar
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12705#12705
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org