查看: 1239|回复: 2

#include <osgViewer/ViewerEventHandlers>出现的问题

[复制链接]

该用户从未签到

发表于 2015-7-3 14:08:01 | 显示全部楼层 |阅读模式
#include "stdafx.h"
#include "GeoDataInfo.h"

#include <osg/MatrixTransform>
#include <osgGA/GUIEventHandler>
#include <osg/PolygonOffset>
#include <osgUtil/Optimizer>
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
各位,大家好,我在包含ViewerEventHandlers头文件时,编译会报出以下的错误,注释掉就编译通过了,什么原因?



1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(223): warning C4003: “maxValue”宏的实参不足
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(223): error C2059: 语法错误:“)”
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(223): error C2612: 基/成员初始值设定项列表中的非法后缀“?”
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(223): error C2143: 语法错误 : 缺少“;”(在“?”的前面)
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(224): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(238): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::WindowSizeHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(241): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::getUsage”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(257): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(261): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::toggleFullscreen”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(262): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::changeWindowedResolution”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(264): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::getNearestResolution”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(241): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::getUsage”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(257): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::WindowSizeHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(281): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ThreadingHandler::ThreadingHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(284): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ThreadingHandler::getUsage”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(298): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ThreadingHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(284): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ThreadingHandler::getUsage”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(298): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ThreadingHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(323): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::RecordCameraPathHandler::RecordCameraPathHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(333): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::RecordCameraPathHandler::getUsage”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(335): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::RecordCameraPathHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(333): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::RecordCameraPathHandler::getUsage”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(335): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::RecordCameraPathHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(363): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}:ODScaleHandler::LODScaleHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(371): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::LODScaleHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(374): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::LODScaleHandler::getUsage”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(371): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::LODScaleHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(374): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::LODScaleHandler::getUsage”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(390): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ToggleSyncToVBlankHandler::ToggleSyncToVBlankHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(395): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ToggleSyncToVBlankHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(398): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ToggleSyncToVBlankHandler::getUsage”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(395): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ToggleSyncToVBlankHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(398): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ToggleSyncToVBlankHandler::getUsage”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(432): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::WriteToFile::WriteToFile”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(434): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::WriteToFile:perator ()”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(434): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::WriteToFile::operator ()”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(452): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::ScreenCaptureHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(460): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::setCaptureOperation”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(461): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::getCaptureOperation”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(465): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(468): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::captureNextFrame”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(472): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::setFramesToCapture”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(475): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::getFramesToCapture”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(479): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::startCapture”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(482): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::stopCapture”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(485): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::getUsage”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(498): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::addCallbackToViewer”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(499): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::removeCallbackFromViewer”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(500): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::findAppropriateCameraForCallback”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(465): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(468): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::captureNextFrame”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(485): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::ScreenCaptureHandler::getUsage”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(511): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::InteractiveImageHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(513): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::InteractiveImageHandler”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(517): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::handle”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(519): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::cull”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(530): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::mousePosition”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(532): warning C4822: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::resize”: 局部类成员函数没有函数体
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(517): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::handle”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>D:\sq\OsgTestCollect\osg\include\osgViewer/ViewerEventHandlers(519): error C3640: “osgViewer::StatsHandler::UserStatsLine::{ctor}::InteractiveImageHandler::cull”: 局部类的引用成员函数或虚拟成员函数必须进行定义
1>main.cpp(120): error C2039: “WindowSizeHandler”: 不是“osgViewer”的成员
1>main.cpp(120): error C2061: 语法错误: 标识符“WindowSizeHandler”
1>main.cpp(139): fatal error C1004: 发现意外的文件尾

该用户从未签到

发表于 2015-7-3 16:13:40 | 显示全部楼层
遇到过同类型的错误,当时是opencv的calib.hpp包含就出错,原因是我使用的接口里面有有个预定义的变量和calib.hpp里的一个预定义变量冲突了。

该用户从未签到

发表于 2015-7-5 22:10:08 | 显示全部楼层
当时我记得我也遇见过这类错误,因为刚开始我的OSG是拷的编译后的二进制版本,偷懒没有自己编译,当时也不知道怎么解决,所以自己又下了源码编译安装的,你实在不行试试,具体其他的我也不知道。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表