1
General discussions / xcode and SFML template
« on: December 27, 2023, 01:01:50 am »
I have been trying to get the SFML supplied template to work in Xcode for days.
ld: Undefined symbols:
sf::WindowBase::setIcon(unsigned int, unsigned int, unsigned char const*), referenced from:
_main in main.o
sf::WindowBase::pollEvent(sf::Event&), referenced from:
_main in main.o
sf::WindowBase::isOpen() const, referenced from:
_main in main.o
So obviously the linker can't find these SFML functions.
Next thing I did was go to build phases and manually put the libraries in Link Binary with libraries.
That solved the undefined symbols but ...
but now at runtime the executable can't find the libraries i.e
Users/Anthony/Library/Developer/Xcode/DerivedData/Clock-hbdspgdobmwublfsselddugcryzd/Build/Products/Debug/Clock.app/Contents/MacOS/../Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system' (no such file)
I am on xcode 15.1
Any help would be appreciated
I am able to compile and run my SFML app in VSCode without any issues. I am trying to use xcode hoping it would make an app bundle for me.
I also compiled and ran the app from the command line without any issue.
ld: Undefined symbols:
sf::WindowBase::setIcon(unsigned int, unsigned int, unsigned char const*), referenced from:
_main in main.o
sf::WindowBase::pollEvent(sf::Event&), referenced from:
_main in main.o
sf::WindowBase::isOpen() const, referenced from:
_main in main.o
So obviously the linker can't find these SFML functions.
Next thing I did was go to build phases and manually put the libraries in Link Binary with libraries.
That solved the undefined symbols but ...
but now at runtime the executable can't find the libraries i.e
Users/Anthony/Library/Developer/Xcode/DerivedData/Clock-hbdspgdobmwublfsselddugcryzd/Build/Products/Debug/Clock.app/Contents/MacOS/../Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system' (no such file)
I am on xcode 15.1
Any help would be appreciated
I am able to compile and run my SFML app in VSCode without any issues. I am trying to use xcode hoping it would make an app bundle for me.
I also compiled and ran the app from the command line without any issue.