You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

homebrew installs the Intel version of SFML, not the M1

I want to run the program:

g++ sfml.cpp -o prog -lsfml-graphics -lsfml-window -lsfml-system

gives an error:
warning: ignoring file '/usr/local/Cellar/sfml/2.6.2/lib/libsfml-window.2.6.2.dylib': found architecture 'x86_64', required architecture 'arm64'


MacBook Pro 14″

Posted on Nov 19, 2024 2:18 AM

Reply
3 replies

Nov 19, 2024 6:27 AM in response to BobHarris

The installation destination for current releases of homebrew on Apple Silicon Macs is /opt/homebrew/*.


This will also require a modification to your PATH statement to:

export PATH=".:${PATH}:/opt/homebrew/bin"



and optionally:

export PATH=".:${PATH}:/opt/homebrew/bin:/opt/homebrew/lib"


Homebrew installed Apple's command-line tools for Xcode which gives you an optimized C++ compiler (clang++) that probably would run circles around GNU g++.


You can see the list of available C++ libraries including those with g++ extensions:

clang++ foo.cpp --std=


homebrew installs the Intel version of SFML, not the M1

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.