gcc-c ++名称空间错误,在tiscamera安装中找不到std :: function

时间:2018-06-28 17:02:23

标签: c++ linux fedora

我正在尝试将tiscamera资源安装到Fedora 27安装程序中,但是在尝试编译时遇到了问题。即,“名称空间“ std”中的“功能”未命名模板类型”

我已经尽力尝试使用-std = c ++ 11标志手动编译一些行,以尝试解决该问题,但是仍然存在相同的错误。了解我在c ++调用中可能做错了什么的任何帮助都将有所帮助。

一些系统细节...我正在使用Fedora 27 这是c ++ -v输出

ldr r1, [r0, #24]

这是我的命令行输入:

[user-name@linux-box ~]$ c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,
obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla 
--enable-shared --enable-threads=posix --enable-checking=release --enable-multilib 
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions 
--enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only 
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl 
--enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver 
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 
--build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC) 

以下是错误消息的示例(由于重复出现,我已将其截断了):

/usr/bin/g++ -std=c++11 -o CMakeFiles/tcam.dir/BackendLoader.cpp.o -c
/home/user-name/working/thirdparty/tiscamera/tiscamera-master/src/BackendLoader.cpp

这是从“ The Imaging Source”公共git repo中检索到的完整BackendLoader.h文件:

In file included from /home/user-name/working/thirdparty/tiscamera/tiscamera-master/src/BackendLoader.cpp:17:0:
/home/user-name/working/thirdparty/tiscamera/tiscamera-master
/src/BackendLoader.h:49:14: error: ‘function’ in namespace ‘std’ does not name a template type
     std::function<size_t(struct tcam_device_info*, size_t)> get_device_list;

0 个答案:

没有答案