掌機 - Miyoo A30 - 解決join is not a member of fmt問題



問題如下:

[ 86%] Building CXX object src/core/CMakeFiles/citra_core.dir/movie.cpp.o
3ds/src/core/movie.cpp: In member function ‘Core::Movie::ValidationResult Core::Movie::ValidateHeader(const Core::CTMHeader&) const’:
3ds/src/core/movie.cpp:468:55: error: ‘join’ is not a member of ‘fmt’; did you mean ‘boost::icl::join’?
  468 |     std::string revision = fmt::format("{:02x}", fmt::join(header.revision, ""));
      |                                                       ^~~~
In file included from 3ds/externals/boost/boost/icl/associative_interval_container.hpp:15,
                 from 3ds/externals/boost/boost/icl/interval_base_set.hpp:24,
                 from 3ds/externals/boost/boost/icl/interval_set.hpp:14,
                 from 3ds/src/./core/hle/kernel/memory.h:8,
                 from 3ds/src/./core/hle/kernel/kernel.h:18,
                 from 3ds/src/./core/hle/kernel/object.h:14,
                 from 3ds/src/./core/hle/kernel/event.h:8,
                 from 3ds/src/./core/hle/service/apt/applet_manager.h:18,
                 from 3ds/src/./core/core.h:16,
                 from 3ds/src/core/movie.cpp:20:
3ds/externals/boost/boost/icl/concept/interval_associator_base.hpp:107:1: note: ‘boost::icl::join’ declared here
  107 | join(Type& object)
      | ^~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unused-command-line-argument’ may have been intended to silence earlier diagnostics
make[2]: *** [src/core/CMakeFiles/citra_core.dir/build.make:3581: src/core/CMakeFiles/citra_core.dir/movie.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1902: src/core/CMakeFiles/citra_core.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

解法如下:

$ cd externals
$ rm -rf fmt
$ git clone https://github.com/fmtlib/fmt -b 10.x