6

I am new to SFML, and followed SFML & Xcode tutorials for SFML 2.5 to try to get a basic program build and run.

After copying the content of Frameworks to /Library/Frameworks and content of extlibs to /Library/Frameworks, and the Xcode templates, I was able to create a sample app via Xcode using the SFML App template.

When I tried to build it, it failed with the following error:

Build error

Any idea what I did wrong?

Help is much appreciated!

Lee Mac
  • 15,615
  • 6
  • 32
  • 80
S.Hua
  • 69
  • 4

1 Answers1

10

Seems like a post build script is pointing to incorrect paths. Here's how to fix this.

In Xcode click on your project's name in the root of the project navigator (where you see the source files) so you can see its configuration.

There should be a header called "build phases". Click on that.

Expand the item called "Run Script".

If you followed the tutorials from SFML to setup your environment, edit the area under the comment "Settings" at the top of the script to look like this.

#These 3 are probably pointing to a directory under 
#/Users/SFML right now which is not on our machines
SFML_DEPENDENCIES_INSTALL_PREFIX="/Library/Frameworks"
CMAKE_INSTALL_FRAMEWORK_PREFIX="/Library/Frameworks"
CMAKE_INSTALL_LIB_PREFIX="/usr/local/lib"

#This Doesn't Change
FRAMEWORKS_FULL_PATH="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/"
rskulles
  • 111
  • 4
  • 1
    Yeah, something new and exciting has broken since Catalina. Something to do with the libraries not being signed. If you look at the error in the question, you see Xcode is looking for the frameworks under /Users/SFML/Desktop/.... This still isn't fixed in the templates from the official release. Now you have to fix this, and whatever code signing error you receive. – rskulles May 18 '20 at 14:11