查看: 1656|回复: 2

新手求助,osggis的编译

[复制链接]

该用户从未签到

发表于 2010-12-4 21:28:49 | 显示全部楼层 |阅读模式
警告如下:
WARNING: Target "osgGIS" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
CMake Warning (dev) at src/osgGIS/CMakeLists.txt:124 (ADD_LIBRARY):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "osgGIS" links to some libraries for which the linker must
search:

glu32, opengl32, glu32, opengl32

and other libraries with known full path:

C:/Program Files/OpenSceneGraph/lib/osgUtil.lib
C:/gdall16-compile/lib/gdal_i.lib
C:/osggis_3rdparty_win32_vs8/lib/lua51.lib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
This warning is for project developers. Use -Wno-dev to suppress it.

WARNING: Target "osgGIS" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osgGIS" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osgGIS" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osgGISProjects" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osgGISProjects" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osgGISProjects" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osgGISProjects" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_build" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_build" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_build" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_makelayer" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_makelayer" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_makelayer" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_simple" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_simple" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_simple" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_viewer" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_viewer" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_viewer" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_mapper" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_mapper" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "app_osggis_mapper" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osggis_test_encode" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osggis_test_encode" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "osggis_test_encode" requests linking to directory "C:\Program Files\OpenSceneGraph\lib". Targets may link only to libraries. CMake is dropping the item.
Generating done
最后总是不能正常编译,求高手相助。

该用户从未签到

发表于 2010-12-4 23:23:20 | 显示全部楼层
我编译的时候也遇到过这个警告!正如那句话写的一样“This warning is for project developers. Use -Wno-dev to suppress it.“ 应该是没有影响的。编译的时候,我觉得需要注意的几个问题:
  第一个: release和debug的问题,因为官方提供的第三库都只是提供了release版本的。所以编译debug的通常不成功
第二个: 一定要细心,注意一些细节问题,比如vpb,环境变量,是不是在自己的电脑上存在多个版本的osg
第三个:就是你测试的目录,也许你编译成功了,但是因为你输入的boston测试文件的目录,是windows风格,就是例如”c\osggis\boston“ 而不是"c\\osggis\\bostom" 或者"c/osggis/bostom"。
  以上是我编译的时候遇到的一些问题,希望能对你有帮助。感觉要对自己和osgGis有信心。另外要细心,想想哪个环节是不是发生了错误。自己的配置环境和别人是不是有一些出入!

该用户从未签到

 楼主| 发表于 2010-12-9 10:13:50 | 显示全部楼层
多些CWORLD
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

联系我们

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