i have succesfully integrated Openscenegraph with Visual Studio 2008. The sample "cessna.osg" given as an example runs fine in VS2008 as a console program. But when i try to run the same code as console in Qt it gives an error. I have built Openscenegraph 3.0 with CMAKE using VS2008 compiler with Qt option on windows7 64 bit. In Qt i am using the version QT 4.7.4 Desktop-MSVC2008 (QtSDK). My Qt .pro file looks like this...
QT += core
QT -= gui
TARGET = OSGTEST (name of the console project)
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH +=C:\OPENSCENEGRAPH\INCLUDE\
LIBS +=C:\OPENSCENEGRAPH\LIB\
-lOpenThreadsd\
-losgd\
-losgDBd\
-losgUtild\
-losgViewerd\
i am using the same library and include file paths in VS2008 IDE as mentioned above.
the main.cpp file looks like dis...(which is the same as in VS2008 IDE)
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>
int main()
{
osg::ref_ptr<osg::Node> root = osgDB::readNodeFile("cessna.osg");
osgViewer::Viewer viewer;
viewer.setSceneData( root.get() );
return viewer.run();
}
the error i am getting is ...
error: LNK1104: cannot open file 'C:\OPENSCENEGRAPH\LIB.obj'
Guide me so that i can run the application as console. Or is there any other way i can run Openscenegraph apps on Qt console?