在安装Dsuite软件时遇到make报如下错误:
Dsuite_common.cpp: In function 'int assignNumLinesToAnalyse(int, int, const std::string&)':
Dsuite_common.cpp:124:45: error: 'istream_iterator' is not a member of 'std'
124 | VCFlineCount = (int)std::count(std::istream_iterator<char>(*vcfFile),std::istream_iterator<char>(),'\n');
| ^~~~~~~~~~~~~~~~
Dsuite_common.cpp:9:1: note: 'std::istream_iterator' is defined in header '<iterator>'; did you forget to '#include <iterator>'?
8 | #include "Dsuite_common.h"
+++ |+#include <iterator>
9 |
Dsuite_common.cpp:124:62: error: expected primary-expression before 'char'
124 | VCFlineCount = (int)std::count(std::istream_iterator<char>(*vcfFile),std::istream_iterator<char>(),'\n');
| ^~~~
Dsuite_common.cpp:124:83: error: 'istream_iterator' is not a member of 'std'
124 | VCFlineCount = (int)std::count(std::istream_iterator<char>(*vcfFile),std::istream_iterator<char>(),'\n');
| ^~~~~~~~~~~~~~~~
Dsuite_common.cpp:124:83: note: 'std::istream_iterator' is defined in header '<iterator>'; did you forget to '#include <iterator>'?
Dsuite_common.cpp:124:100: error: expected primary-expression before 'char'
124 | VCFlineCount = (int)std::count(std::istream_iterator<char>(*vcfFile),std::istream_iterator<char>(),'\n');
| ^~~~
make: *** [Build/Dsuite_common.o] Error 1
解决方法在安装目录中找到Dsuite_utils.h文件,添加
#include <iterator>
再次编译通过。
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!