Skip to content

Build error on v1.1.2: redefinition of ‘struct std::hash<std::filesystem::__cxx11::path>’ #1047

@eduvfalc

Description

@eduvfalc

Hi,

When trying to build and install CNL v1.1.2 I ran through the following error:

[ 95%] Building CXX object test/unit/CMakeFiles/test-unit-presentations-cppcon2017.dir/presentations/cppcon2017.cpp.o
/home/falco/repos/cnl-1.1.2/test/unit/presentations/cppcon2017.cpp:24:13: error: redefinition of ‘struct std::hash<std::filesystem::__cxx11::path>’
   24 | struct std::hash<filesystem::path> {
      |             ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/filesystem:45,
                 from /home/falco/repos/cnl-1.1.2/test/unit/presentations/cppcon2017.cpp:16:
/usr/include/c++/11/bits/fs_path.h:1361:10: note: previous definition of ‘struct std::hash<std::filesystem::__cxx11::path>’
 1361 |   struct hash<filesystem::path>
      |          ^~~~~~~~~~~~~~~~~~~~~~

It happens in both cppcon2017.cpp and cppcon2018.cpp. Any hint on what might be going wrong here or what I can be missing?

Note: I am running it on WSL Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions