Install sfml in nixos

I try to install sfml by adding “sfml” and “csfml” into systemPackages.

But when I compile a file, the <SFML/Graphics.hpp> can’t be find.

Don’t install libraries through nix-env or systemPackages, use nix-shell instead. See FAQ/I installed a library but my compiler is not finding it. Why? - NixOS Wiki for details.

1 Like

thank you! It works well now!