1

I've been searching everywhere for the solution to this issue to no avail. I'm running a DigitalOcean droplet running ubuntu. I only have access to the terminal. I'm taking code that builds perfectly fine on windows and moving it to the VM. When I use the 'cmake ..' command it works fine, then on 'make' I'm given 'Undefined reference to {Insert your choice of filesystem function here}.

It seems similar to this issue: Problem adding std::filesystem to CMake Project However, the author wrote that the solution was to update g++ and gcc to 8.2. This did not solve my issue so here I am.

I have the flag set to use c++17 and to stop build if it is not using it for whatever reason and I believe that is where it fails as it shows me this:

-- ENABLE_CPP11        = ON       <--------
-- BUILD_EXAMPLES      = OFF
-- BUILD_TESTS         = OFF
...

Among other info that doesn't seem relevant.

Thanks in advance.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
  • 1
    It would appear that you are not linking correctly to `filesystem`. Does this [answer](https://stackoverflow.com/questions/58545562/what-is-the-correct-way-to-link-c17-filesystem-with-cmake) help? – thomas_f Feb 24 '20 at 19:54
  • @thomas_f it runs fine on windows. It is only when I run it on the VM that it fails. This indicates to me that I'm missing c++17. – CatSandwich Feb 25 '20 at 00:28

0 Answers0