Try gcc instead. libgcc doesn’t contain any binaries, just libraries, as the name suggests (though I wonder why that package isn’t just gcc.dev, historic reasons I guess?).
You’ll probably find that adding gcc to your system won’t actually let you build very much, though, you’ll need a devshell and explicitly depend on all your dependencies in that shell to be able to link against anything.
Don’t use mkShellNoCC for C/++ development of course.
I think nixpkgs’ stdenv.mkShell comes with a gcc stdenv by default, so you wouldn’t need to explicitly add gcc. If you want to use clang or a different version of gcc, search for stdenv on search.nixos.org and use the mkShell of one of those.
AFAICT the package with the binaries isn’t libgcc, it’s libgcc^out which is really just gcc-unwrapped^out (because libgcc is just gcc-unwrapped^libgcc), and you’d want the wrapped compiler to do anything useful in any case