I want to work with SFML on my Mac on Xcode. I read this thread: How do I use SFML on Apple M1 Mac? and I am trying to install SFML same way as someone did this in first answer. I have also installed Rosetta. But I have some issues with that.
First, I tried to do this the same way:
g++ /Users/’myname’/Documents/projects/’myproject’/’myproject’/’myproject’ -I/opt/homebrew/Cellar/sfml/2.6.1_1/include -o app -L/opt/homebrew/Cellar/sfml/2.6.1_1/lib -lsfml-graphics -lsfml-window -lsfml-system
ld: warning: search path ‘/opt/homebrew/Cellar/sfml/2.6.1_1/lib’ not found
ld: library ‘sfml-graphics’ not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And the files were not found, so I looked it up carefully and I saw that my files are “2.6.1” not “2.6.1_1” so I tried this:
g++ /Users/’myname’/Documents/projects/’myproject’/’myproject’/’myproject’ -I/opt/homebrew/Cellar/sfml/2.6.1/include -o app -L/opt/homebrew/Cellar/sfml/2.6.1/lib -lsfml-graphics -lsfml-window -lsfml-system
ld: file cannot be mmap()ed, errno=22 path=/Users/’myname’/Documents/projects/’myproject’/’myproject’/’myproject’ in ‘/Users/jessicapawlowska/Documents/projects/’myproject’/’myproject’/’myproiject”
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And this also didn’t work. How to fix that? I really want to work with SFML on Xcode.