1
General / Re: Can't compile "SFML Works" example project on m1 Mac
« on: July 24, 2021, 10:09:20 am »
If you are still trying to compile SFML for M1, I just did it some minutes ago and I want to share my process:
Now, into your build folder you should find a "lib" directory with SFML arm64 libs.
In order to check that the libs have been compiled for Arm64 you can use "file" command :
file <library-name>.
Please let me know if you have problems linking the libraries in your project.
In my case I used Cmake, with target_link_libraries , like this :
target_link_libraries(particle PRIVATE ${CMAKE_SOURCE_DIR}/importedLibs/libsfml-graphics.dylib)
Have a nice day !
- git clone https://github.com/SFML/SFML.git
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=arm64 ..
- make all
Now, into your build folder you should find a "lib" directory with SFML arm64 libs.
In order to check that the libs have been compiled for Arm64 you can use "file" command :
file <library-name>.
Please let me know if you have problems linking the libraries in your project.
In my case I used Cmake, with target_link_libraries , like this :
target_link_libraries(particle PRIVATE ${CMAKE_SOURCE_DIR}/importedLibs/libsfml-graphics.dylib)
Have a nice day !