Sorry, I am a newby with nix (using the package manager under darwin) and the forum.
I am trying to create a flake.nix for a c++ project. The main goal is to use a nix develop
shell for development. This is how I instatiate the shell within the flake
devShells.default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } rec {
name = "my-c++-project";
packages = with pkgs; [
cmake
ninja
gtest
spdlog
abseil-cpp
];
});
As you can see, I am trying to use gcc-12 (on darwin).
The problem is that spdlog
brings in a fmt
library which at link time gives this error:
Undefined symbols for architecture arm64:
"__ZN3fmt2v87vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE",
which is the same to say that the following is missing:
fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)
So probably, the fmt
lib was compiled with the wrong C++ ABI, and the question finally is: how can override the way fmt
is being compiled?