It's been 10+ years since I used SDL so I can't provide an answer to your specific question, but I can provide some help for you to accomplish your goal.
File loading code from SDL articles and tutorials aren't going to work well on Mac because Mac apps have a different structure. Mac apps are app bundles that look like a single file in the Finder but have folders and files inside them. You can examine the contents of app bundles in the Finder by selecting a file, right-clicking, and choosing Show Package Contents.
In a Mac game the sound and image files are in the app bundle. Windows and Linux do not have app bundles. If you use code to load a sound file, such as the following, in a Mac game:
Mix_Chunk* sound = Mix_LoadWAV("sounds/rm1.wav");
The game won't be able to find and load the file.
The big thing to get file loading to work properly with SDL on Mac is to create an Xcode project that creates an app bundle, not a command-line tool project. You may be able to find SDL Xcode project templates on GitHub or at the SDL site that take care of things for you. But you can also create an App project that uses Objective-C as the language and storyboards for the user interface. Delete the .m, .h, and storyboard files from the project. Add SDL and your C++ code.
The following tutorial is old so the screenshots are going to look very different, but it shows how to set up SDL2 with Xcode:
https://www.meandmark.com/blog/2012/01/using-sdl-with-xcode-4/
The following Reddit thread has a link to a newer article on using SDL with Xcode:
https://www.reddit.com/r/Xcode/comments/zi9oku/how_do_i_set_up_sdl_with_xcode/