C++ development evironment: .../bin/ld: cannot find .../outputs/out/lib:

I try to get a c++ development environment. I use the following flake.nix

{
  description = "C++ Development with Nix in 2023";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
  };

  outputs = inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      # This is the list of architectures that work with this project
      systems = [
        "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"
      ];
      perSystem = { config, self', inputs', pkgs, system, ... }: {

        # devShells.default describes the default shell with C++, cmake, boost,
        # and catch2
        devShells.default = pkgs.mkShell {
          packages = with pkgs; [
            # C++ Compiler is already part of stdenv
            boost
            catch2
            cmake
          ];
        };
      };
    };
}

When trying to compile with

g++ main.cpp

I get the following error

/nix/store/z34dss3rj1rnp1g820r64w0na7452jy1-binutils-2.41/bin/ld: cannot find Intelligence/Assignments/1/outputs/out/lib: No such file or directory
collect2: error: ld returned 1 exit status

I searched the web but did not find any solution.

Best regards
Mickey