- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试按照 official guide 编译 NFIQ 2.0 源代码.在最后的构建步骤中,出现以下错误。
FRFXLLCreateLibraryContext.cpp:72:5: error: missing binary operator before token "1000000"
#if CLOCKS_PER_SEC == 1000
^
<builtin>: recipe for target 'FRFXLLCreateLibraryContext.o' failed
这里是关于当前gcc版本的信息
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
这里是ubuntu版本信息
uname -r
4.4.0-36-generic
是什么导致了这个问题,是否可以通过使用不同的编译器来解决?这是 make 命令的完整构建日志
make
make -C ../libFRFXLL
make[1]: Entering directory '/home/tutoivon/nfiq2/NFIQ2/libFRFXLL'
make -C src/libFRFXLL
make[2]: Entering directory '/home/tutoivon/nfiq2/NFIQ2/libFRFXLL/src/libFRFXLL'
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'FRFXLLCreateFeatureSetInPlaceFromRaw.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLCreateFeatureSetInPlaceFromRaw.o FRFXLLCreateFeatureSetInPlaceFromRaw.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLCreateFeatureSetInPlaceFromRaw.o
r - FRFXLLCreateFeatureSetInPlaceFromRaw.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'FRFXLLCreateFeatureSetInPlaceFromRaw.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLCreateContext.o FRFXLLCreateContext.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLCreateContext.o
r - FRFXLLCreateContext.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLCreateFeatureSetInPlace.o FRFXLLCreateFeatureSetInPlace.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLCreateFeatureSetInPlace.o
r - FRFXLLCreateFeatureSetInPlace.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLGetLibraryVersion.o FRFXLLGetLibraryVersion.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLGetLibraryVersion.o
r - FRFXLLGetLibraryVersion.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'FRFXLLExport.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLExport.o FRFXLLExport.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLExport.o
r - FRFXLLExport.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'FRFXLLExport.o' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLCreateFeatureSet.o FRFXLLCreateFeatureSet.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLCreateFeatureSet.o
r - FRFXLLCreateFeatureSet.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLDuplicateHandle.o FRFXLLDuplicateHandle.cpp
ar rv ../../lib/libFRFXLL.a FRFXLLDuplicateHandle.o
r - FRFXLLDuplicateHandle.o
make[2]: Warning: Archive '../../lib/libFRFXLL.a' seems to have been created in deterministic mode. 'S/LC_MESSAGES/make.mo' will always be updated. Please consider passing the U flag to ar to avoid the problem.
g++ -O2 -I../algorithm -I../../include -I../../src/include -I../../../ExternalDependencies/STL/STLport-5.2.1/stlport -fno-exceptions -fno-rtti -fno-stack-protector -fPIC -DFRFXLL_MAJOR=5 -DFRFXLL_MINOR=2 -DFRFXLL_REVISION=0 -DFRFXLL_BUILD=0 -c -o FRFXLLCreateLibraryContext.o FRFXLLCreateLibraryContext.cpp
In file included from /usr/include/time.h:41:0,
from FRFXLLCreateLibraryContext.cpp:35:
FRFXLLCreateLibraryContext.cpp:72:5: error: missing binary operator before token "1000000"
#if CLOCKS_PER_SEC == 1000
^
<builtin>: recipe for target 'FRFXLLCreateLibraryContext.o' failed
make[2]: *** [FRFXLLCreateLibraryContext.o] Error 1
rm FRFXLLCreateContext.o FRFXLLCreateFeatureSetInPlaceFromRaw.o FRFXLLDuplicateHandle.o FRFXLLCreateFeatureSet.o FRFXLLGetLibraryVersion.o FRFXLLCreateFeatureSetInPlace.o FRFXLLExport.o
make[2]: Leaving directory '/home/tutoivon/nfiq2/NFIQ2/libFRFXLL/src/libFRFXLL'
Makefile:50: recipe for target 'src/libFRFXLL' failed
make[1]: *** [src/libFRFXLL] Error 2
make[1]: Leaving directory '/home/tutoivon/nfiq2/NFIQ2/libFRFXLL'
Makefile:7: recipe for target '../libFRFXLL' failed
make: *** [../libFRFXLL] Error 2
最佳答案
NFIQ 库在这里有一个错误。
它假设 CLOCKS_PER_SEC
是一个宏常量,可以在像 #if
这样的预处理器指令中使用,但它不是! It expands, in an implementation-defined way, to some expression ……至少在 GCC 6.3 中(显然你的版本也是如此)该表达式是 ((clock_t)1000000)
。 This expression will not work in a preprocessor directive .
也许 NFIQ 的作者只在 Visual Studio 中对其进行了测试,也许 Visual Studio 恰好将该宏扩展为基本文字。或者,也许他们根本没有测试。
不幸的是,没有简单的解决方法。他们必须完全停止在预处理器指令中使用 CLOCKS_PER_SEC
,但我不知道他们是否可以使用实际的 C++ 代码轻松实现相同的目的。绝对是一个要向作者提出的问题。
关于c++ - CLOCKS_PER_SEC, token 前缺少二元运算符... [NFIQ 2.0],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42132559/
Or 运算符 对两个表达式进行逻辑“或”运算。 result = expression1 Or expression2 参数 result 任意数值变量。 expression1 任意
Not 运算符 对表达式执行逻辑非运算。 result = Not expression 参数 result 任意数值变量。 expression 任意表达式。 说明 下表显示如何
Is 运算符 比较两个对象引用变量。 result = object1 Is object2 参数 result 任意数值变量。 object1 任意对象名。 object2 任意
\ 运算符 两个数相除并返回以整数形式表示的结果。 result = number1\number2 参数 result 任意数值变量。 number1 任意数值表达式。 numbe
And 运算符 对两个表达式进行逻辑“与”运算。 result = expression1 And expression2 参数 result 任意数值变量。 expression1
运算符(+) 计算两个数之和。 result = expression1 + expression2 参数 result 任意数值变量。 expression1 任意表达式。 exp
我对此感到困惑snippet : var n1 = 5-"4"; var n2 = 5+"4"; alert(n1); alert(n2); 我知道 n1 是 1。那是因为减号运算符会将字符串“4”转
我想我会得到 12,而不是 7。 w++,那么w就是4,也就是100,而w++, w 将是 8,1000;所以 w++|z++ 将是 100|1000 = 1100 将是 12。 我怎么了? int
Xor 运算符 对两个表达式进行逻辑“异或”运算。 result = expression1 Xor expression2 参数 result 任意数值变量。 expression1
Mod 运算符 两个数值相除并返回其余数。 result = number1 Mod number2 参数 result 任意数值变量。 number1 任意数值表达式。 numbe
Imp 运算符 对两个表达式进行逻辑蕴涵运算。 result = expression1 Imp expression2 参数 result 任意数值变量。 expression1 任
Eqv 运算符 执行两个表达式的逻辑等价运算。 result = expression1 Eqv expression2 参数 result 任意数值变量。 expression1 任
我有一个运算符重载的简单数学 vector 类。我想为我的运算符(operator)获取一些计时结果。我可以通过计时以下代码轻松计时我的 +=、-=、*= 和/=: Vector sum; for(s
我是用户定义比较运算符的新手。我正在读一本书,其中提到了以下示例: struct P { int x, y; bool operator、运算符<等),我们
在 SQL 的维基百科页面上,有一些关于 SQL 中 bool 逻辑的真值表。 [1] 维基百科页面似乎来源于 SQL:2003 标准。 等号运算符 (=) 的真值表与 SQL:2003 草案中的 I
我遇到了一个奇怪的 C++ 运算符。 http://www.terralib.org/html/v410/classoracle_1_1occi_1_1_number.html#a0f2780081f
我正在阅读关于 SO 和 answers 中的一个问题,它被提到为: If no unambiguous matching deallocation function can be found, pr
我偶然发现了这个解决方案,但我无法理解其中到底发生了什么。谁能解释一下! 据我了解,它试图通过计算一半的单元格然后将其加倍来计算 a*b 网格中的单元格数量。但是我无法理解递归调用。 请不要建议其他解
Go的基本类型 布尔类型bool 长度:1字节 取值:布尔类型的取值只能是true或者false,不能用数字来表示 整型 通用整型 int / uint(有符号 / 无符号,下面也类似) 长度:根据运
在本教程中,您将学习JavaScript中可用的不同运算符,以及在示例的帮助下如何使用它们。 什么是运算符? 在JavaScript中,运算符是一种特殊符号,用于对运算数(值和变量)执行操作。例如,
我是一名优秀的程序员,十分优秀!