I apologise for any inaccurate language - I'm very new to writing in c++ and using cmake
I'm using the cmake gui to do the generation. My generator is MinGW. The generation goes fine but when I try to run mingw32-make
in the build directory (in terminal) I get the error message shown below:
anamorph_video_commandline.cpp:6:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
This is what my CMakeLists.txt looks like:
cmake_minimum_required(VERSION 3.26.0)
project(anamorph_movie)
# Set the C++ standard to C++17
set(CMAKE_CXX_STANDARD 17)
# include the vcg library
include_directories(./lib/vcglib-main/)
# include the eigen library
include_directories(./lib/vcglib-main/eigenlib)
# Add your executable and source files here
add_executable(${PROJECT_NAME} anamorph_video_commandline.cpp)
target_link_libraries(${PROJECT_NAME} stdc++fs)
I've tried using <experimental/filesystem>
in my .cpp and get the same error message except it says
anamorph_video_commandline.cpp:6:22: fatal error: filesystem: No such file or directory
#include <experimental/filesystem>
MinGW and cmake were both installed a couple days ago so I think its unlikely that its to do with the version.
As you can see from my CMakeLists.txt I also tried using: target_link_libraries(${PROJECT_NAME} stdc++fs)
per the recommendation of something I found online, also no luck.