Hi, this is the whole code #include <iostream> #include <osgDB/ReadFile> #include <osgViewer/Viewer>
int main() { osg::ref_ptr<osg::Node> root = osgDB::readNodeFile( std::string("cessna.osg" )); osgViewer::Viewer viewer; viewer.setSceneData( root.get() ); return viewer.run(); } and using cmake with below CMakeList cmake_minimum_required(VERSION 3.6) project(osgTester) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") INCLUDE_DIRECTORIES(/usr/local/include/osg) INCLUDE_DIRECTORIES(/usr/local/include/OpenThreads) INCLUDE_DIRECTORIES(/usr/local/include/osgViewer) INCLUDE_DIRECTORIES(/usr/local/include/osgDB) INCLUDE_DIRECTORIES(/usr/local/include/osgUtil) LINK_DIRECTORIES(/usr/local/lib64/) add_executable(osgTester main.cpp) TARGET_LINK_LIBRARIES(osgTester osg OpenThreads osgViewer osgDB osgUtil) Thank you! Cheers, kyungsoo ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68592#68592 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org