查看: 1451|回复: 3

请问各位老师,这是什么错误,

[复制链接]

该用户从未签到

发表于 2012-3-26 10:20:33 | 显示全部楼层 |阅读模式
我是按照Openscenegraph三维渲染引擎设计与实践来编写的hello world   ,但总是编译不成功,请各位老师指点
错误如下:


1>------ 已启动生成: 项目: bjsj, 配置: Debug Win32 ------
1>正在编译...
1>main.cpp
1>c:\program files\openscenegraph\include\openthreads\block(39) : error C2065: “ScopedLock”: 未声明的标识符
1>c:\program files\openscenegraph\include\openthreads\block(39) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(39) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(52) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(52) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(65) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(65) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(75) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(75) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(116) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\block(116) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(116) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(131) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\block(131) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(131) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(138) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\block(138) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(138) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\block(148) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\block(148) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\block(148) : error C3861: “mutlock”: 找不到标识符
1>c:\program files\openscenegraph\include\osg\stats(51) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\osg\stats(51) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\osg\stats(51) : error C3861: “lock”: 找不到标识符
1>c:\program files\openscenegraph\include\osg\stats(61) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\osg\stats(61) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\osg\stats(61) : error C3861: “lock”: 找不到标识符
1>c:\program files\openscenegraph\include\osg\stats(67) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\osg\stats(67) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\osg\stats(67) : error C3861: “lock”: 找不到标识符
1>c:\program files\openscenegraph\include\osg\stats(77) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\osg\stats(77) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\osg\stats(77) : error C3861: “lock”: 找不到标识符
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(37) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(37) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(37) : error C2660: “OpenThreads::ReentrantMutex::lock”: 函数不接受 1 个参数
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(46) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(46) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(46) : error C2660: “OpenThreads::ReentrantMutex::lock”: 函数不接受 1 个参数
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(58) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(58) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(58) : error C2660: “OpenThreads::ReentrantMutex::lock”: 函数不接受 1 个参数
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(92) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(92) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(92) : error C2660: “OpenThreads::ReentrantMutex::lock”: 函数不接受 1 个参数
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(101) : error C2039: “ScopedLock”: 不是“OpenThreads”的成员
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(101) : error C2275: “OpenThreads::Mutex”: 将此类型用作表达式非法
1>c:\program files\openscenegraph\include\openthreads\reentrantmutex(101) : error C2660: “OpenThreads::ReentrantMutex::lock”: 函数不接受 1 个参数
1>f:\123\bjsj\bjsj\main.cpp(22) : error C2065: “Node”: 未声明的标识符
1>f:\123\bjsj\bjsj\main.cpp(22) : error C2228: “.get”的左边必须有类/结构/联合
1>        类型是“'unknown-type'”
1>f:\123\bjsj\bjsj\main.cpp(25) : error C2039: “optimizer”: 不是“osgUtil::Optimizer”的成员
1>        c:\program files\openscenegraph\include\osgutil\optimizer(61) : 参见“osgUtil::Optimizer”的声明
1>正在生成代码...
1>正在跳过...(未检测到相关更改)
1>bjsj.cpp
1>生成日志保存在“file://f:\123\bjsj\bjsj\Debug\BuildLog.htm”
1>bjsj - 51 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========

该用户从未签到

发表于 2012-3-26 11:38:23 | 显示全部楼层
你预先编译osg了么?

该用户从未签到

发表于 2012-3-26 14:06:07 | 显示全部楼层
本帖最后由 fenma3422 于 2012-3-26 14:06 编辑

从表面上看应该是包含目录设置的不对,导致找不到定义

该用户从未签到

 楼主| 发表于 2012-3-27 10:35:55 | 显示全部楼层
tianxiao888 发表于 2012-3-26 11:38
你预先编译osg了么?

编译了的,我用的是2.8.2(debug),,我在控制台里面用的测试命令都可以实现了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

联系我们

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