Cze.
Próbuję rozwiązać problem, który objawia się tym, że nie mogę napisać żadnego programu z elementami filesystem, gdyż wywala mi błąd:
[A bit of crap]
D:/mingw-w64/i686-7.3.0-posix-dwarf-rt_v5-rev0/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')
|| (__p.has_root_name() && __p.root_name() != root_name()))
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
[A lot of crap]
Szukałem trochę rozwiązań, widziałem jakieś trunki itd, ale nie za bardzo wiem jak tego użyć, co to w ogóle jest itd.
Gdyby ktoś wiedział jak to naprawić byłbym wdzięczny.
Pozdrawiam.
PS
Kod:
#include <fstream>
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;
int main() {
fs::create_directories("foo/bar");
}
Kompilacja:
g++ -std=c++1z -Wall -Wextra -Wunused -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast -pedantic-errors -O3 main.cpp -lstdc++fs
Kompilator:
g++ (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.