Linking CXX executable t..._ck/bin/test_0d_regression_test_c
FAILED:
Код: Выделить всё
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[456/614] Building CXX object test...d_twisting_rigid_elastic_bar.cpp.
ninja: build stopped: subcommand failed.
< /code>
Это команда, которую я использую для сборки: < /p>
git clone https://github.com/Xiangyu-Hu/SPHinXsys.git sphinxsys
cd sphinxsys
cmake -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ \
-D CMAKE_TOOLCHAIN_FILE="$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-S . \
-B ./build
cmake --build build/
Я попытался переустановить все и установить ./vcpkg Удалить Spdlog -recurse и
./vcpkg install spdlog, они не сработают. Я очень новичок в CPP, поэтому любой совет будет очень полезным ... Большое спасибо.[447/614] Linking CXX executable t..._ck/bin/test_0d_regression_test_c
FAILED: [code=1] tests/2d_examples/2d_examples_ck/test_0d_regression_test_ck/bin/test_0d_regression_test_ck
: && /usr/bin/clang++ -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names tests/2d_examples/2d_examples_ck/test_0d_regression_test_ck/CMakeFiles/test_0d_regression_test_ck.dir/regression_test.cpp.o -o tests/2d_examples/2d_examples_ck/test_0d_regression_test_ck/bin/test_0d_regression_test_ck -F/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/System/Library/Frameworks src/libsphinxsys_2d.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libSimTKsimbody.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libSimTKmath.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libSimTKcommon.a -framework Accelerate -lm -ldl -ldl -lm /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libtbb.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libtbbmalloc.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libboost_program_options.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libboost_container.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libfmt.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/manual-link/libgtest_main.a /Users/isselinm28/Documents/cse/biofluid/vcpkg/installed/x64-osx/lib/libgtest.a && :
Undefined symbols for architecture x86_64:
"fmt::v11::detail::vformat_to(fmt::v11::detail::buffer&, fmt::v11::basic_string_view, fmt::v11::basic_format_args, fmt::v11::detail::locale_ref)", referenced from:
void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, fmt::v11::basic_string_view, std::__1::basic_string&&) in regression_test.cpp.o
void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, fmt::v11::basic_string_view, std::__1::basic_string&&, std::__1::basic_string_view&&) in regression_test.cpp.o
void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, fmt::v11::basic_string_view, unsigned long&, unsigned long&&, std::__1::basic_string&&) in regression_test.cpp.o
void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, fmt::v11::basic_string_view, std::__1::basic_string&&, std::__1::basic_string_view&&, std::__1::basic_string&&) in regression_test.cpp.o
void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, fmt::v11::basic_string_view, std::__1::basic_string_view&&, std::__1::basic_string&&) in regression_test.cpp.o
spdlog::details::full_formatter::format(spdlog::details::log_msg const&, tm const&, fmt::v11::basic_memory_buffer&) in libsphinxsys_2d.a(io_log.cpp.o)
spdlog::details::c_formatter::format(spdlog::details::log_msg const&, tm const&, fmt::v11::basic_memory_buffer&) in libsphinxsys_2d.a(io_log.cpp.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[456/614] Building CXX object test...d_twisting_rigid_elastic_bar.cpp.
ninja: build stopped: subcommand failed.
Подробнее здесь: [url]https://stackoverflow.com/questions/79724447/ld-symbols-not-found-for-architecture-x86-64-clang-error-linker-command-fa[/url]