If your error handling is thorough, it would have been much more simple to narrow down where the problem is.
For example:
sf::SoundBuffer soundBuffer;
if (!soundBuffer.loadFromFile("sound.wav")
{
std::cerr << "Could not load sound." << std::endl;
return EXIT_FAILURE;
}
Or, if that isn't enough:
const std::string soundFilename{ "sound.wav " };
sf::SoundBuffer soundBuffer;
if (!soundBuffer.loadFromFile(soundFilename)
{
std::cerr << "Could not load sound: " soundFilename << std::endl;
return EXIT_FAILURE;
}