loot / libloot

A C++ library for accessing LOOT's metadata and sorting functionality.
GNU General Public License v3.0
32 stars 12 forks source link

fatal error: filesystem: No such file or directory #56

Closed alan-cugler closed 1 year ago

alan-cugler commented 5 years ago

Hi I am trying to build libloot (and eventually loot) natively on ubuntu 18.04. I am primarily following this guys guide and have gotten all the dependencies installed.

I ran these commands to get it compiling and I make it past several dependencies before choking.

$ mkdir build; cd build/
$ cmake .. && make all

The Error is as follows:

Scanning dependencies of target libloot_internals_tests
[ 55%] Building CXX object CMakeFiles/libloot_internals_tests.dir/generated/loot_version.cpp.o
[ 56%] Building CXX object CMakeFiles/libloot_internals_tests.dir/src/api/api.cpp.o
In file included from /home/alan-cugler/testing/libloot/src/api/api.cpp:25:0:
/home/alan-cugler/testing/libloot/include/loot/api.h:28:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
CMakeFiles/libloot_internals_tests.dir/build.make:86: recipe for target 'CMakeFiles/libloot_internals_tests.dir/src/api/api.cpp.o' failed
make[2]: *** [CMakeFiles/libloot_internals_tests.dir/src/api/api.cpp.o] Error 1
CMakeFiles/Makefile2:223: recipe for target 'CMakeFiles/libloot_internals_tests.dir/all' failed
make[1]: *** [CMakeFiles/libloot_internals_tests.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I did attempt to run through the entire repo and replace #include <filesystem> with #include <experimental/filesystem>. This did get past the half a dozen identical errors but eventually culminated in a final scroll fest of errors.

So is there a dependency or modification I need to make? Its been a couple years since I've done C++ code, but I don't mind having to brush up for this to run native.

My System

apocalyptech commented 5 years ago

Do you have https://packages.ubuntu.com/search?keywords=libboost-filesystem-dev installed? I'm guessing that's probably what you need...

Ortham commented 5 years ago

You need to compile with C++17 to get std::filesystem.

On Fri, 31 May 2019, 05:28 CJ Kucera, notifications@github.com wrote:

Do you have https://packages.ubuntu.com/search?keywords=libboost-filesystem-dev installed? I'm guessing that's probably what you need...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/loot/libloot/issues/56?email_source=notifications&email_token=AASROETVPWRACFK47UF43SLPYCSQRA5CNFSM4HRR6CL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWUFJ3Q#issuecomment-497571054, or mute the thread https://github.com/notifications/unsubscribe-auth/AASROEUWCU5ON7RJV4KP7BDPYCSQRANCNFSM4HRR6CLQ .

alan-cugler commented 5 years ago

@apocalyptech I checked and have this library installed.

@Ortham What would explicitly be the command to do so?

I tried to search for commands to explicitly state c++17 but I am falling short. Currently, I found this post kind of wrestling with a similar problem, but adding -lstdc++ to cmake .. && make all made no difference.

I also found this talking about stating in the files what version to use, but I am assuming I shouldnt have to do that since this code is meant to be in c++17.

Ortham commented 5 years ago

Did you export CXX="g++-8" CC="gcc-8" before running cmake?

Ortham commented 1 year ago

Closing due to lack of response.