QQ登录

只需一步,快速开始

查看: 13632|回复: 15
打印 上一主题 下一主题

【转】Visual C++ 2010编译FlightGear 2.8.0

[复制链接]

主题

好友

450

积分

版主

跳转到指定楼层
#
发表于 2012-8-23 17:40:39 |只看该作者 |正序浏览
本帖最后由 jinchengde 于 2012-8-23 17:46 编辑

引用:
http://wiki.flightgear.org/Building_using_CMake_-_Windows

第三方库下载:
ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/



Required software   Directory tree On Windows, assumptions on the directory structure are made to automate the discovery of dependencies.
This recommended directory structure is described below. Clicking the links allows you to download pre-built parts (for 3rdParty, make sure to download the right bits version. You need only one of the zips.).

${MSVC_3RDPARTY_ROOT} /
       3rdParty /  
       ( includes boost, plib, fltk, zlib, libpng, libjpeg, libtiff, freetype, libsvn, gdal, ... )  
               bin /
               include /
               lib /
       boost_1_44_0 /  (included in the 3rdParty package linked above)  
               boost /
       install /
              msvc100 /
             ( for VS2010 32 bits, or msvc90, msvc90-64 or msvc100-64 for VS2008 32, VS2008 64 and VS2010 64 )  
                  OpenSceneGraph /  
                 ( OSG CMake install )  
                         bin /
                         include /
                         lib /
                  SimGear /  
                  (create this empty for now, subfolders will be created by build process)  
                        include /
                        lib /
                   FlightGear /  
                  (create this empty for now)  
                         include /
                         lib /
  When building a 64 bits version, use the following structure for the 3dparty tools:
               3rdParty.x64 /  ( 64 bit version )  
                        bin /
                        include /
                        lib /
  If you do not use the recommended structure you will need to enter paths by hand. Source and build directories can be located anywhere.
NdT: glut is missing for the 64bits build, you can use freeglut.
  Building
  • Set up a work directory as described above.
  • Building SimGear
    • Open the CMake gui.
    • Set "Where is the source code" to wherever you put the SimGear sources (from the released tarball or the git repository).
    • Set "Where to build the binaries" to a new empty directory (could be anywhere and any name, for example naming it simgear-build, at the same folder location as your unzipped SimGear source folder was put).
    • Press . The first time that the project is configured, CMake will bring up a window asking you to "Specify the generator for this project" i.e. which compiler you wish to use. Select Visual Studio 10, (or Visual Studio 10 Win64 for 64 bit), and press Finish. CMake will now do a check on your system and will produce a preliminary build configuration.
    • CMake adds new configuration variables in red. Some have a value ending with -NOTFOUND. These variables should receive your attention. Some errors will prevent SimGear from building and others will simply invalidate some options without causing build errors.
      • First check the MSVC_3RDPARTY_ROOT variable. If it is not set, chances are that there will be a lot of -NOTFOUND errors. Instead of trying to fix every error individually, set that variable to the location of the directory structure that is presented above. Then press again.
      • Set the  CMAKE_INSTALL_PREFIX variable to ${MSVC_3RDPARTY_ROOT}/install/msvc100/SimGear.
      • Also check the lines with a checkbox. These are build options and may impact the feature set of the built program.
    • Repeat the process from step 5, until is enabled.
    • Press .
    • Start Visual Studio 2010 and load the SimGear solution (SimGear.sln) located in "Where to build the binaries".
    • Choose the "Release" build in the VS2010 "Generation" toolbar
    • Generate the solution with F7 key or right-click the top level "Solution SimGear" in the Solution Explorer and choose Build.
    • If there are build errors, return to CMake, clear remaining errors, and .
    • When Visual Studio is able to build everything without errors, right-click on the INSTALL project (further down within the "Solution Simgear" solution) and choose Build, which will put the include and lib files in ${CMAKE_INSTALL_PREFIX}
  • Building FlightGear Repeat the steps under Building Simgear, but change the SimGear paths to FlightGear.
  • Enjoy!
分享到: QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
分享分享0 收藏收藏1

主题

好友

32

积分

报考学院待录取

15#
发表于 2015-11-9 11:27:38 |只看该作者
一定要看CMAKE的英文版资料
回复

使用道具 举报

主题

好友

36

积分

报考学院待录取

14#
发表于 2014-10-13 13:56:41 |只看该作者
看来很多高手啊,我也遇到点问题最近,第二次编译或者拷贝到别的电脑再编译也不行有个msb6006的错误,请高手指点
回复

使用道具 举报

13#
飞友  发表于 2013-8-19 15:02:15
2.10.0版本,运行出现找不到程序输入点,不知道怎么回事?有遇到过这种情况的吗?
回复

使用道具

12#
飞友  发表于 2013-8-19 15:00:38
2.10.0版本,运行怎么会出现[/img]
回复

使用道具

11#
飞友  发表于 2013-8-19 08:51:35
请问,我用网上已经编译好的OSG,怎么还是提示找不到呢?
version is 2 dot 10 dot 0
ignoring: ^E:/FlightGear/simgear-2.10.0/.git;\\.gitignore;Makefile.am;~$;
Library installation directory: lib
3rdparty files located in E:/FlightGear
BOOST_ROOT is E:/FlightGear/boost_1_44_0
Boost version: 1.44.0
SimGear mode: NORMAL
Sound support: ENABLED
Could NOT find osgText (missing:  OSGTEXT_LIBRARY)
Could NOT find osgSim (missing:  OSGSIM_LIBRARY)
Could NOT find osgDB (missing:  OSGDB_LIBRARY)
Could NOT find osgParticle (missing:  OSGPARTICLE_LIBRARY)
Could NOT find osgGA (missing:  OSGGA_LIBRARY)
Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY)
Could NOT find osg (missing:  OSG_LIBRARY)
Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY)
CMake Error at D:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find OpenSceneGraph (missing: OSGTEXT_FOUND OSGSIM_FOUND
  OSGDB_FOUND OSGPARTICLE_FOUND OSGGA_FOUND OSGUTIL_FOUND OSG_FOUND
  OPENTHREADS_FOUND) (found suitable version "3.0.1", minimum required is
  "3.0.0")
Call Stack (most recent call first):
  D:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  D:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindOpenSceneGraph.cmake:187 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:183 (find_package)
回复

使用道具

主题

好友

450

积分

版主

10#
发表于 2013-6-6 21:56:03 |只看该作者
chiuras 发表于 2013-5-23 22:20
怎么设置BOOST_ROOT?要在PATH里面设置?

不需要再PATH里面设置吧,我似乎没有设置BOOST_ROOT也可以
回复

使用道具 举报

主题

好友

67

积分

航院新生

9#
发表于 2013-5-23 22:20:45 |只看该作者
怎么设置BOOST_ROOT?要在PATH里面设置?

点评

不需要再PATH里面设置吧,我似乎没有设置BOOST_ROOT也可以  详情 回复 发表于 2013-6-6 21:56
回复

使用道具 举报

主题

好友

565

积分

超级版主

8#
发表于 2013-3-16 21:29:31 |只看该作者
天天 发表于 2012-12-11 01:11
在用cmake编译simgear的时候出现了错误
CMake Error at F:/Program Files/CMake 2.8/share/cmake-2.8/Modu ...

Please set BOOST_ROOT to the root 没有找到boost头文件 ,叫你设置boost目录
回复

使用道具 举报

主题

好友

47

积分

报考学院待录取

7#
发表于 2012-12-11 01:11:13 |只看该作者
在用cmake编译simgear的时候出现了错误
CMake Error at F:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1192 (message):
  Unable to find the requested Boost libraries.
  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:110 (find_package)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
   used as include directory in directory C:/FlightGear/simgear-2.8.0
非常着急  请大家帮帮我  谢谢了   

点评

Please set BOOST_ROOT to the root 没有找到boost头文件 ,叫你设置boost目录  详情 回复 发表于 2013-3-16 21:29
回复

使用道具 举报

主题

好友

565

积分

超级版主

6#
发表于 2012-9-24 20:19:58 |只看该作者
liuwh_99 发表于 2012-8-25 22:57
一个是_CrtIsValidHeap错误,由于Atmosphere.cxx和StandardAtmosphere.cxx中“P-sl-psf”属性的Tie操作造成 ...

另一个是HttpClient类,你把实时天气关闭就不会了,暂时解决方法
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入FG

本版积分规则

手机版|联系我们| FlightGear ( 吉ICP备19002044号-7 )

GMT+8, 2024-5-19 19:18

Powered by Discuz! X3.2

© 2001-2013 FlightGear Inc.

返回顶部