在VS2010下编译opticks

一、准备软件:

1.   VisualStudio 2010

源代码中的某些库(lib文件)是用VS2010生成的,如果改用其他编译器,如VS2012,会出现链接错误(版本不匹配)。

2.   QT

开源版本4.7.4:qt-win-opensource-4.7.4-vs2008.

安装完QT后应配置环境变量,否则示例程序不能运行,在系统变量PATH中添加QT路径,如C:\Qt\4.7.4\bin.

3.   Python

Python2.5或2.6,注意不要安装3.0以上版本,否则会导致源代码文件中的python程序不能运行。配置环境变量:在PATH中添加Python路径,如C:\Python2.6\.

4.  SVN

安装TortoiseSVN-1.8.1;用来下载源码和依赖库;

安装Slik-Subversion (Subversion Command Line Client);

5.  依赖库(已打包好,位于dependencies文件夹下):

Boost, Cg, curl, ehs,ffmpeg, gdal, geotiff, GL, hdf, minizip, opencollada, opencv, opencv2,openjpeg, ossim, qt4, qwt-qt4, szip, tbb, xercesc, xqilla, yaml-cpp

以上库已打包在文件夹dependencies中,只需将dependencies下的include和lib分别加入到各项目的VC++包含目录和引用库中.

6.  下载Opticks源代码4.9.X,包含依赖库.

二、编译步骤:

1.  运行VS2012,打开opticks/opticks4.7.0/Code/Application文件夹下的VS工程文件 Opticks.sln.

2.  解决依赖,全选所有项目,在其VC++目录下,将opticks/opticks4.7.0/dependencies /include和opticks/opticks4.7.0/dependencies /lib分别加入到项目/属性/通用配置/VC++目录/包含目录和库目录中.

3.  逐个生成该解决方案目录下每个项目.

4.   生成->生成解决方案.

5.运行.

三、可能出现的错误:

(1)error C2220: warning treated as error - no 'object' file generated

(The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss)

 解决方式(1)这个问题可以通过选择cpp或h的全部内容,菜单File-》advanced save options,选择编码方式为Unicode -codepage 1200

 解决方式(2)属性中c/C++ -》General选项卡下,把Treat waring as errors设为NO

 ( 2 )下面是需要修改的位置,修改完成后在VS2010的”文件”->”高级保存选项”中将有问题的文件的代码页选择为UTF-8随后保存。

Code\application\Interfaces\appconfig.h
编码问题to UTF-8(代码页65001 codepage 65001)
45行?)改为μ")
46行?)改为°")

Code\application\Interfaces\TypesFile.h

编码问题to UTF-8(代码页65001 codepage 65001)


Code\application\PlugInUtilities/AppVersion.h

编码问题to UTF-8(代码页65001 codepage 65001)
另外在codepage 936 没有版权符号©,所以用(C)作为版权符号
15 行改为#define APP_COPYRIGHT "Copyright (C) 2008, Ball Aerospace & Technologies Corp."
19 行改为#define APP_COPYRIGHT_MSG "(C) 2000 - 2008 Ball Aerospace & Technologies Corp., Fairborn, Ohio"


Code\application\PlugInUtilities\StringUtilities.cpp
编码问题to UTF-8(代码页65001 codepage 65001)
506 - 508 行
ADD_ENUM_MAPPING(DMS_FULL, "DD° MM' SS.SS\"", "Full")
ADD_ENUM_MAPPING(DMS_FULL_DECIMAL, "DD.ddd°", "DecimalDegrees")
ADD_ENUM_MAPPING(DMS_MINUTES_DECIMAL, "DD° MM.MM'", "DegreesMinutes")


Code\application\PlugInUtilities\GeoPoint.h

编码问题to UTF-8(代码页65001 codepage 65001)
169 行注释有问题,两个问号改为° ,即那句话改为Creates a latitude/longitude point with an initial value of 
0° N and 0° E.


Code\application\PlugIns\src\Aspam\AspamViewerDialog.cpp
编码问题to UTF-8(代码页65001 codepage 65001)
894 - 899 行改为如下
      "1 - Latitude < 20°" <<
      "2 - Latitude 20°-70° (summer)" <<
      "3 - Latitude 20°-70° (winter)" <<
      "4 - Latitude > 70° (summer)" <<
      "5 - Latitude > 70° (winter)" <<
      "6 - US Standard";
1187 行 最后?)替换为°");
1247 行 最后?)替换为°");
1400 行 最后?)替换为°");
解决方案中所有的"癈"替换为"°C"
文件中出现的行数为1249, 1326, 1328, 1363, 1364, 1397, 1398


Code\application\PlugIns\src\WizardItems\ZoomAndPanToPoint.cpp
编码问题to UTF-8(代码页65001 codepage 65001)
431 - 449 行
     tipLat += "   Space delimited: DD MM SS.SSS (e.g. 40 06 31.982)\n";
     tipLat += "   DMS delimited: DDdMMmSS.SSSs (e.g. 40d06m31.982s)\n";
     tipLat += "   Symbol delimited: DD°MM'SS.SSS\" (e.g. 40°06'31.982\")\n";
     tipLat += "   Decimal degrees: DD.DDDDDD (e.g. 40.108884)\n";
     tipLat += "   Concatenated: DDMMSS.SSS (e.g. 400631.982)\n";
     tipLat += "\nNotes:\n";
     tipLat += "   For the concatenated format, two characters are required for degrees, minutes,\n";
     tipLat += "       and seconds (e.g. 06, not 6).\n";
     tipLat += "   To designate the southern hemisphere, preface the value with 'S', 's', or '-'.";
     tipLon += "   Space delimited: DDD MM SS.SSS (e.g. -114 06 31.982)\n";
     tipLon += "   DMS delimited: DDDdMMmSS.SSSs (e.g. -114d06m31.982s)\n";
     tipLon += "   Symbol delimited: DDD°MM'SS.SSS\" (e.g. -114°06'31.982\")\n";
     tipLon += "   Decimal degrees: DDD.DDDDDD (e.g. -114.108884)\n";
     tipLon += "   Concatenated: DDDMMSS.SSS (e.g. -1140631.982)\n";
     tipLon += "\nNotes:\n";
     tipLon += "   For the concatenated format, a minimum of two characters are required for degrees,\n";
     tipLon += "       and two characters are required for minutes and seconds (e.g. 06, not 6).\n";
     tipLon += "   To designate the western hemisphere, preface the value with 'W', 'w', or '-'.";


Code\application\PlugIns\src\DataFusion\Matrix.h
编码问题to UTF-8(代码页65001 codepage 65001)
78 行 ?改为× (乘号)
Code\application\PlugIns\src\ENVI\EnviLibraryExporter.cpp
编码问题to UTF-8(代码页65001 codepage 65001)
229 行Check for overwriting hdr file –


Dependencies\32\include\opencollada\colladafwgeometry.h
行尾不一致
编码问题to UTF-8(代码页65001 codepage 65001)
32 - 36 行注释
     • B-Spline
     • Bézier
     • Mesh
     • NURBS
     • Patch


Dependencies\32\include\opencollada\colladafwmesh.h
编码问题to UTF-8(代码页65001 codepage 65001)
31 - 34 行注释
     * • Vertex position
     * • Vertex color
     * • Vertex normal
     * • Vertex texture coordinate


启动时效果图:


运行时效果图:


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值