我的项目是在Windows (vc++17)上构建的,而且我对Linux也是新手,所以我不知道发生了什么。
我为我的项目创建了CMakeLists文件(带有C++17需求),生成了makefile,然后我使用make尝试在Linux上构建它。错误是:
/home/julien/source/zipfs/zipfs/include/zipfs/zipfs_assert.h:30:70: error: no matching function for call to ‘std::exception::exception(<brace-enclosed initializer list>)’
30 | zipfs_usage_error_t(const char* message) : std::exception{ message } {}
| ^
In file included from /usr/include/c++/9/exception:38,
from /usr/include/c++/9/new:40,
from /usr/include/c++/9/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/string:41,
from /home/julien/source/zipfs/zipfs/include/zipfs/zipfs_path_t.h:3,
from /home/julien/source/zipfs/zipfs/include/zipfs/zipfs_error_t.h:3,
from /home/julien/source/zipfs/zipfs/source/zipfs_error_t.cpp:1:已入罪的法典是:
zipfs_usage_error_t(const char* message) : std::exception{ message } {}我不认为这有什么问题;这是c++版本错配吗?
https://stackoverflow.com/questions/71767599
复制相似问题