First, yes, I saw this topic: How to avoid std::filesystem linker errors with Qt?
I have my c++ project and there I used a std::filesystem .I can compile it with cmd ( g++ (GCC) 9.2.0 )and for example:
g++ -std=c++17 -Wall -Wconversion-null -c client.cpp -o c.o -lstdc++fs
but with this .pro file:
LIBS += -lws2_32
LIBS += -lstdc++fs
QT -= gui
CONFIG += c++17
CONFIG -= app_bundle
QMAKE_LFLAGS += -lstdc++fs
DEFINES += QT_DEPRECATED_WARNINGS
SOURCES += \
client.cpp \
logmsg.cpp \
main.cpp
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
HEADERS += \
client.h \
includes.h
I cannot do it and I cannot understand why.
Error:
filesystem: No such file or directory
#include <filesystem>
^~~~~~~~~~~~