|
环境:WINXP SP2,MinGW 5.1.4,CMake 2.6.2,OSG 2.7.9
错误:用CMake生成MinGW Makefile时只将BUILD_OSG_WRAPPERES设置为ON,其余默认,在编译osgIntrospection时出错:
[ 68%] Building CXX object src/osgIntrospection/CMakeFiles/osgIntrospection.dir/DefaultReflectors.obj
In file included from D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/variant_cast:19,
from D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/InstanceCreator:19,
from D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/Reflector:24,
from D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReflectionMacros:19,
from D:\OSG\OpenSceneGraph-2.7.9\src\osgIntrospection\DefaultReflectors.cpp:15:
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:66: warning: ISO C++ forbids declaration of `wostream' with no type
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:66: error: invalid use of `::'
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:66: error: `wostream' declared as a `virtual' field
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:66: error: expected `;' before '&' token
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:69: error: expected `;' before "virtual"
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:69: warning: ISO C++ forbids declaration of `wistream' with no type
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:69: error: invalid use of `::'
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:69: error: `wistream' declared as a `virtual' field
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:69: error: expected `;' before '&' token
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:72: error: expected `;' before "virtual"
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:121: warning: ISO C++ forbids declaration of `wostream' with no type
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:121: error: invalid use of `::'
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:121: error: `wostream' declared as a `virtual' field
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:121: error: expected `;' before '&' token
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:126: error: expected `;' before "virtual"
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:126: warning: ISO C++ forbids declaration of `wistream' with no type
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:126: error: invalid use of `::'
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:126: error: `wistream' declared as a `virtual' field
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:126: error: expected `;' before '&' token
D:/OSG/OpenSceneGraph-2.7.9/include/osgIntrospection/ReaderWriter:132: error: expected `;' before "virtual"
make[2]: *** [src/osgIntrospection/CMakeFiles/osgIntrospection.dir/DefaultReflectors.obj] Error 1
make[1]: *** [src/osgIntrospection/CMakeFiles/osgIntrospection.dir/all] Error 2
make: *** [all] Error 2
OSG 2.7.8 编译时也是同样的问题,在Ubuntu 8.10下用GCC 4.3.2编译OSG 2.8.0 rc1(同样CMAKE中只改了BUILD_OSG_WRAPPERES一项)顺利通过。 |
|