一、“sysdep1.h”文件缺失

错误提示:

fatal error C1083: 无法打开包括文件: “sysdep1.h”: No such file or directory

这些作为这个软件的bug, 不需要太清楚为什么造成这种错误。只需要更正过来即可。你的经历应该放在对算法的理解上去。

解决方法:

在bundler源码根目录下的\lib\f2c中:

1>将sysdep1.h0文件名修改为sysdep1.h

2>将signal1.h0文件名修改为signal1.h

3>新建一个arith.h文件(创建头文件头只需将文件名定义为arith),这本身是个头文件(注意区别里面的cpp文件),在文件里添加如下内容即可:

#define IEEE_8087
#define Arith_Kind_ASL 1
#define Long int
#define Intcast (int)(long)
#define Double_Align
#define X64_bit_pointers
#define QNaN0 0x0
#define QNaN1 0xfff80000

二、<hash_map> is deprecated and will be REMOVED

提示:

hash_map(17): fatal error C1189: #error:  <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.

原因:

正如所提示的那样,是static assertion failed with "<hash_map> is deprecated and will be REMOVED.

解决方法:

1、在bundler的项目属性下,增加一个定义, /D _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 。(推荐)

2、在使用include<hash_map>之前,加上#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS定义。(不推荐,比较繁复。)

3、使用unordered_map代替hash_map

以上三种方法任选其一。

三、“int32_t”: 重定义

错误提示:

src\include\types.h(6): error C2371: “int32_t”: 重定义;不同的基类型

解释:

源码中的include\types.h里的ypedef signed long int32_t定义,与

Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\stdint.h

中的int32_t定义冲突了,而且其实也不是一个含义。

解决:

将typedef signed long int32_t这个定义中的int32_t,改为int32_st。并修改VS解决方案里的所有引用。

四、“_isnan”: 不是“std”的成员

提示:

\bundleadd.cpp(352): error C2039: “_isnan”: 不是“std”的成员

解决:

去掉_isnan前面的std::即可。

五、无法解析的外部符号GetVectorIntersection

提示:

1>BaseGeometry.obj : error LNK2019: 无法解析的外部符号 "class std::vector<int,class std::allocator<int> > __cdecl GetVectorIntersection(class std::vector<int,class std::allocator<int> > const &,class std::vector<int,class std::allocator<int> > const &)" (?GetVectorIntersection@@YA?AV?$vector@HV?$allocator@H@std@@@std@@ABV12@0@Z),该符号在函数 "public: bool __thiscall BaseApp::ImagesPartOfPanorama(int,int)" (?ImagesPartOfPanorama@BaseApp@@QAE_NHH@Z) 中被引用
1>ImageData.obj : error LNK2001: 无法解析的外部符号 "class std::vector<int,class std::allocator<int> > __cdecl GetVectorIntersection(class std::vector<int,class std::allocator<int> > const &,class std::vector<int,class std::allocator<int> > const &)" (?GetVectorIntersection@@YA?AV?$vector@HV?$allocator@H@std@@@std@@ABV12@0@Z)
1>MatchTracks.obj : error LNK2001: 无法解析的外部符号 "class std::vector<int,class std::allocator<int> > __cdecl GetVectorIntersection(class std::vector<int,class std::allocator<int> > const &,class std::vector<int,class std::allocator<int> > const &)" (?GetVectorIntersection@@YA?AV?$vector@HV?$allocator@H@std@@@std@@ABV12@0@Z)
1>BundleIO.obj : error LNK2019: 无法解析的外部符号 "bool __cdecl FileExists(char const *)" (?FileExists@@YA_NPBD@Z),该符号在函数 "public: void __thiscall BaseApp::ReadCameraConstraints(void)" (?ReadCameraConstraints@BaseApp@@QAEXXZ) 中被引用
1>BundlerGeometry.obj : error LNK2001: 无法解析的外部符号 "bool __cdecl FileExists(char const *)" (?FileExists@@YA_NPBD@Z)
1>ImageData.obj : error LNK2001: 无法解析的外部符号 "bool __cdecl FileExists(char const *)" (?FileExists@@YA_NPBD@Z)
1>BundlerApp.obj : error LNK2019: 无法解析的外部符号 "void __cdecl Tokenize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Tokenize@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@0@Z),该符号在函数 "public: virtual void __thiscall BundlerApp::ProcessOptions(int,char * *)" (?ProcessOptions@BundlerApp@@UAEXHPAPAD@Z) 中被引用
1>ImageData.obj : error LNK2001: 无法解析的外部符号 "void __cdecl Tokenize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Tokenize@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@2@0@Z)
1>BundleTwo.obj : error LNK2019: 无法解析的外部符号 "void __cdecl generate_permutation(int,int *)" (?generate_permutation@@YAXHPAH@Z),该符号在函数 "void __cdecl PermuteMatches(class std::vector<class KeypointMatch,class std::allocator<class KeypointMatch> > &)" (?PermuteMatches@@YAXAAV?$vector@VKeypointMatch@@V?$allocator@VKeypointMatch@@@std@@@std@@@Z) 中被引用
1>ImageData.obj : error LNK2019: 无法解析的外部符号 "struct img_t * __cdecl RescaleImage(struct img_t *,int,double &)" (?RescaleImage@@YAPAUimg_t@@PAU1@HAAN@Z),该符号在函数 "public: void __thiscall ImageData::LoadThumb256(void)" (?LoadThumb256@ImageData@@QAEXXZ) 中被引用
1>ImageData.obj : error LNK2019: 无法解析的外部符号 "void __cdecl GetRotationFromSpherical(double,double,double *)" (?GetRotationFromSpherical@@YAXNNPAN@Z),该符号在函数 "public: void __thiscall ImageData::DetectLineSegments(double,double,double,double)" (?DetectLineSegments@ImageData@@QAEXNNNN@Z) 中被引用
1>E:\Projs\algs\bundler\src\vc++\Debug\Bundler.exe : fatal error LNK1120: 6 个无法解析的外部命令

问题剖析:

这种无法识别的外部符号,是VS编译过程中常见的错误。解决思路一般为:

检查第三方库的lib是否Debug、Release、x86、x64 版本正确;

检查是否引用了合适的lib库;

检查当前项目中,自己定义的类库中,是否仅仅加入VS Project的仅有xxx.h文件,而没有.cpp文件。

而此处出现的错误,就是属于最后面的那一种情况。将src\BundleUtil.cpp找到,并加入Bundler中。

参考

windows7下实现Bundler,PMVS,CMVS在VS2010/VS2013上的编译并通过cygwin运行(1). 2016.11

VS2015静态断言失败How to fix hash_map is deprecated and will be REMOVED,2019.6

bundler-sfm windows下编译过程中出现的错误的更多相关文章

  1. windows下编译java源文件的编码错误

    import java.util.Arrays;public class ArrayAsAReference{ public static void main(String[] args) { int ...

  2. GDAL库简介以及在Windows下编译过程

    GDAL(Geospatial Data Abstraction Library,地理空间数据抽象库)是一个在X/MIT许可协议下的开源栅格空间数据转换库.官网http://www.gdal.org/ ...

  3. windows下编译Hugin时的template错误

    Hugin依赖于VIGRA,而VIGRA包含大量的模板,编译Hugin是出现如下的大量错误: "unexpected token(s) preceding ':'; skipping app ...

  4. FormatMessage与GetLastError配合使用,排查windows api调用过程中的错误

    前一段时间在学习windows api调用过程中,遇到过一些调用错误或者程序没能显示预期的结果,或者直接出现vc运行时错误. 这对新手来说是司空见惯的事,因为不太熟悉难免会出错,出错的信息如果能显示很 ...

  5. 编译过程中,termcap.h 文件找不到路径 licli.a终于生成

    编译过程中,termcap.h      文件找不到路径   查看是linux  源码下找不到termcap.h文件   安装了所有关于*cap*的源码包也不起作用     今天终于解决了这个问题,搜 ...

  6. Windows下编译objective-C

    Windows下编译objective-C 2011-08-31 14:32 630人阅读 评论(0) 收藏 举报 windowscocoa工具objective clibraryxcode   目录 ...

  7. 在Windows下编译FFmpeg详细说明

    MinGW:一个可自由使用和自由发布的Windows特定头文件和使用GNC工具集导入库的集合,允许你生成本地的Windows程序而不需要第三方C运行时 MinGW,即 Minimalist GNU F ...

  8. 在Windows下编译OpenSSL(VS2005和VC6)

    需要说明的是请一定安装openssl-0.9.8a .  openssl-1.0.0我没有编译成功. 如何在Windows下编译OpenSSL (Vs2005使用Vc8的cl编译器)1.安装Activ ...

  9. 一步步实现windows版ijkplayer系列文章之四——windows下编译ijkplyer版ffmpeg

    一步步实现windows版ijkplayer系列文章之一--Windows10平台编译ffmpeg 4.0.2,生成ffplay 一步步实现windows版ijkplayer系列文章之二--Ijkpl ...

随机推荐

  1. Python3——根据m3u8下载视频(下)之requests

    下半场ING,好吧,本来准备明天写的(拖延真快乐.gif),请然而,,,早上八点多跑公司加班(看书+学习)去,发现大门上挂着一把大锁,我只想说门禁是拿来看的嘛,加啥破锁o(╥﹏╥)o,严重打击了好员工 ...

  2. Python之flask框架2

    Flask是一个Python编写的Web 微框架,让我们可以使用Python语言快速实现一个网站或Web服务.本文参考自Flask官方文档,大部分代码引用自官方文档. 安装flask 首先我们来安装F ...

  3. k8s集群搭建 2019

    参考,https://github.com/qxl1231/2019-k8s-centos 事实上k8s集群的搭建很简单,笔者在搭建的过程中遇到的主要问题是镜像无法下载的问题. 如果发现教程中提供的镜 ...

  4. springboot shiro 基本整合

    springboot shiro 基本整合 https://www.w3cschool.cn/shiro/c52r1iff.html http://shiro.apache.org/configura ...

  5. SQL必知必会01 检索列 排序

  6. 微信小程序入门笔记

    目录的作用: 1. pages目录: 该目录下存放所有的定义页面 2. utils目录: 该目录下存放定义的一些小功能组件 3. 根目录下app.js文件: 定义小程序对象, 执行小程序生命周期内的各 ...

  7. ASP.NET Core 中的 Main 方法

    ASP.NET Core 中的 Main 方法 在 ASP.NET Core 项目中,我们有一个名为Program.cs的文件.在这个文件中,我们有一个public static void Main( ...

  8. 动态规划 | 保留重复元素的LCS 1045

    这题也可以用LIS求解.LIS解题报告:动态规划 | 对输入进行hash处理的LIS 1045 普通LCS是必须完全匹配的,所以状态转移方程式(末端匹配到时):dp[i][j]=dp[i-1][j-1 ...

  9. greatest among three numbers

    public class Solution { public static void main(String[] args) { Scanner ip = new Scanner(System.in) ...

  10. 【操作系统之十三】Netfilter与iptables

    一.Netfilter Netfilter是由Rusty Russell提出的Linux 2.4内核防火墙框架,该框架既简洁又灵活,可实现安全策略应用中的许多功能,如数据包过滤.数据包处理.地址伪装. ...