在网上的大部分教程中,都是先去github上的pangolin最新版本下载。之后再进行一系列依赖库的安装,再cmake … ,make, make install。
然而,在上述github上的pangolin最新版本的CMAKE工程下安装的make过程总是出一大堆的错误,齐刷刷地非常多。
错误信息大概是这样:
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/assert.h:50:3: note: suggested alternative:
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/assert.h:45:6: note: ‘pangolin::abort’
void abort(const char* function, const char* file, int line, Args&&... args)
^
In file included from /home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:28:0:
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h: At global scope:
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:64:61: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
std::streamsize xsputn(const char * s, std::streamsize n) override;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:67:23: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
int overflow(int c) override;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:72:5: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
) override;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:75:20: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
int filenum = -1;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:88:5: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex update_mutex;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:89:5: error: ‘condition_variable’ in namespace ‘std’ does not name a type
std::condition_variable cond_queued;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:90:5: error: ‘condition_variable’ in namespace ‘std’ does not name a type
std::condition_variable cond_dequeued;
^
/home/chenww/Desktop/Pangolin-master/include/pangolin/utils/threadedfilebuf.h:91:5: error: ‘thread’ in namespace ‘std’ does not name a type
std::thread write_thread;
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp: In member function ‘void pangolin::threadedfilebuf::open(const string&, size_t)’:
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:90:5: error: ‘write_thread’ was not declared in this scope
write_thread = std::thread(std::ref(*this));
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:90:20: error: ‘thread’ is not a member of ‘std’
write_thread = std::thread(std::ref(*this));
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:90:32: error: ‘ref’ is not a member of ‘std’
write_thread = std::thread(std::ref(*this));
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp: In member function ‘void pangolin::threadedfilebuf::close()’:
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:97:5: error: ‘cond_queued’ was not declared in this scope
cond_queued.notify_all();
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:99:8: error: ‘write_thread’ was not declared in this scope
if(write_thread.joinable())
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp: In member function ‘virtual std::streamsize pangolin::threadedfilebuf::xsputn(const char*, std::streamsize)’:
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:138:9: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:138:26: error: ‘mutex’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:138:43: error: ‘update_mutex’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:138:55: error: ‘lock’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:141:13: error: ‘cond_dequeued’ was not declared in this scope
cond_dequeued.wait(lock);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:153:9: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:153:26: error: ‘mutex’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:153:43: error: ‘update_mutex’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:153:55: error: ‘lock’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:157:13: error: ‘cond_dequeued’ was not declared in this scope
cond_dequeued.wait(lock);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:182:5: error: ‘cond_queued’ was not declared in this scope
cond_queued.notify_one();
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp: In member function ‘virtual int pangolin::threadedfilebuf::overflow(int)’:
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:193:9: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:193:26: error: ‘mutex’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:193:43: error: ‘update_mutex’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:193:55: error: ‘lock’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:197:13: error: ‘cond_dequeued’ was not declared in this scope
cond_dequeued.wait(lock);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:209:5: error: ‘cond_queued’ was not declared in this scope
cond_queued.notify_one();
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp: In member function ‘void pangolin::threadedfilebuf::operator()()’:
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:248:13: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:248:30: error: ‘mutex’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:248:47: error: ‘update_mutex’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:248:59: error: ‘lock’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:252:17: error: ‘cond_queued’ was not declared in this scope
cond_queued.wait(lock);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:273:13: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:273:30: error: ‘mutex’ is not a member of ‘std’
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:273:47: error: ‘update_mutex’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:273:59: error: ‘lock’ was not declared in this scope
std::unique_lock<std::mutex> lock(update_mutex);
^
/home/chenww/Desktop/Pangolin-master/src/utils/threadedfilebuf.cpp:282:9: error: ‘cond_dequeued’ was not declared in this scope
cond_dequeued.notify_all();
^
make[2]: *** [src/CMakeFiles/pangolin.dir/utils/threadedfilebuf.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/pangolin.dir/all] Error 2
make: *** [all] Error 2
解决方法:用旧版本的代码!!!https://github.com/zzx2GH/Pangolin.git
解决方法:用旧版本的代码!!!
解决方法:用旧版本的代码!!!
解决方法:用旧版本的代码!!!
解决方法:用旧版本的代码!!!