@MaM

Использование experimental/filesystem?

gcc 6.2, g++ 6.2, выдаёт ошибку /tmp/ccc9BRoD.o: In function `registration_anticipant()':
test.cpp:(.text+0x290): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
test.cpp:(.text+0x2ce): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
test.cpp:(.text+0x2f7): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::operator*() const'
test.cpp:(.text+0x336): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::operator++()'
test.cpp:(.text+0x344): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
test.cpp:(.text+0x353): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
test.cpp:(.text+0x362): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
test.cpp:(.text+0x39d): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
test.cpp:(.text+0x3ac): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/tmp/ccc9BRoD.o:test.cpp:(.text+0x3bb): more undefined references to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' follow
/tmp/ccc9BRoD.o: In function `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::experimental::filesystem::v1::__cxx11::path const&)':
test.cpp:(.text._ZNSt12experimental10filesystem2v17__cxx1128recursive_directory_iteratorC2ERKNS2_4pathE[_ZNSt12experimental10filesystem2v17__cxx1128recursive_directory_iteratorC5ERKNS2_4pathE]+0x26): undefined reference to `std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::experimental::filesystem::v1::__cxx11::path const&, std::experimental::filesystem::v1::directory_options, std::error_code*)'
/tmp/ccc9BRoD.o: In function `std::experimental::filesystem::v1::__cxx11::path::path(char const (&) [2])':
test.cpp:(.text._ZNSt12experimental10filesystem2v17__cxx114pathC2IA2_cS3_EERKT_[_ZNSt12experimental10filesystem2v17__cxx114pathC5IA2_cS3_EERKT_]+0x73): undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
collect2: error: ld returned 1 exit status
Компилирую с ключом -std=gnu++17 . На сайте en.cppreference.com тот же код собирается, собственно вопрос, что я делаю не так.
  • Вопрос задан
  • 745 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы