Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get real path for source - Xcode, SFML, C++

Tags:

xcode

sfml

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!

like image 575
S.Hua Avatar asked Nov 15 '18 17:11

S.Hua


1 Answers

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/"
like image 66
rskulles Avatar answered Oct 16 '22 03:10

rskulles