I have a new M1 Mac (macOS Big Sur 11.2) and downloaded Visual Studio Code Insiders. I installed SFML successfully using home-brew and have the "boiler plate" folder in place. (Followed instructions in this video which worked great on my previous Intel Mac:
https://www.youtube.com/watch?v=XEGLsHp2bw0).
When I open the "boiler plate" folder, it loads the sample project. When I try to build it, I get error below.
Is SFML not yet compatible w/ Apple Silicon?Build & Run: Debug (target: sfml-vscode-boilerplate)
⇛ Linking: bin/Debug/sfml-vscode-boilerplate
ld: warning: ld: warning: ignoring file /usr/local/lib/libsfml-window.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64ld: warning: ignoring file /usr/local/lib/libsfml-network.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/lib/libsfml-graphics.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ignoring file /usr/local/lib/libsfml-audio.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/lib/libsfml-system.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
"sf::CircleShape::CircleShape(float, unsigned long)", referenced from:
_main in Main.cpp.o
"sf::RenderStates::Default", referenced from:
_main in Main.cpp.o
"sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)", referenced from:
_main in Main.cpp.o
"sf::RenderTarget::clear(sf::Color const&)", referenced from:
_main in Main.cpp.o
"sf::RenderWindow::RenderWindow()", referenced from:
_main in Main.cpp.o
"sf::RenderWindow::~RenderWindow()", referenced from:
_main in Main.cpp.o
"sf::Color::White", referenced from:
_main in Main.cpp.o
"sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)", referenced from:
_main in Main.cpp.o
"sf::Shape::setTexture(sf::Texture const*, bool)", referenced from:
_main in Main.cpp.o
"sf::Shape::setFillColor(sf::Color const&)", referenced from:
_main in Main.cpp.o
"sf::Shape::~Shape()", referenced from:
sf::CircleShape::~CircleShape() in Main.cpp.o
"sf::String::String(char const*, std::__1::locale const&)", referenced from:
_main in Main.cpp.o
"sf::Window::close()", referenced from:
_main in Main.cpp.o
"sf::Window::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)", referenced from:
_main in Main.cpp.o
"sf::Window::display()", referenced from:
_main in Main.cpp.o
"sf::Window::pollEvent(sf::Event&)", referenced from:
_main in Main.cpp.o
"sf::Texture::loadFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sf::Rect<int> const&)", referenced from:
_main in Main.cpp.o
"sf::Texture::Texture()", referenced from:
_main in Main.cpp.o
"sf::Texture::~Texture()", referenced from:
_main in Main.cpp.o
"sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)", referenced from:
_main in Main.cpp.o
"sf::RenderWindow::getSize() const", referenced from:
_main in Main.cpp.o
"sf::Window::getSystemHandle() const", referenced from:
_main in Main.cpp.o
"sf::Window::isOpen() const", referenced from:
_main in Main.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/Debug/sfml-vscode-boilerplate] Error 1
make: *** [all] Error 2
✘ Failed!
Review the compile errors above.The terminal process "/bin/zsh '-c', 'bash ./build.sh buildrun Debug vscode'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
I have confirmed that the Insiders version of Visual Studio Code for Mac (arm64) is compatible with Apple Silicon Macs. Further, I THOUGHT I read somewhere (can't find source, sorry) that the C/C++ extension for Visual Studio Code
wasn't yet Apple Silicon compatible but I'm not 100% sure now.
What else can I provide to help me figure this out?
Help!