You're a legend mate, thanks for this! i came across this video after a last-ditch search for a solution to the error that comes from not setting a runpath.
@MikeShah
2 жыл бұрын
Thank you for the kind words 🙂
@KonstantinosEgarhos
10 ай бұрын
this must be a Mac issue but when trying to open the built app I get these pop ups > “libsfml-graphics.2.6.1.dylib” can’t be opened because Apple cannot check it for malicious software. And the app doesn't open
@MikeShah
10 ай бұрын
Tey finding the file and opening it manually to verify it is not malicious -- I think this has to be done one time
@dwolrdcojp
2 жыл бұрын
Not all heroes wear capes
@MikeShah
2 жыл бұрын
Thank you for the kind words!
@Afkari7
7 ай бұрын
i encountered this error when I run make -j 8 In file included from /Users/afkari/sfml/src/SFML/Graphics/Font.cpp:38: /Library/Frameworks/Mono.framework/Headers/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found #include Can you please help? (I have an assignment due this sunday and I can't do it without running sfml on Mac
@MikeShah
7 ай бұрын
Probably need to install the freetype dev libraries
@Afkari7
7 ай бұрын
@@MikeShah how would I do that any code to run on terminal?
@MikeShah
7 ай бұрын
@@Afkari7 try with 'brew install freetype'. Not sure offhand
@Afkari7
7 ай бұрын
@@MikeShah I’m still getting the error. This is what the second part says: make[2]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2 make: *** [all] Error 2
@jeremiassoll1837
7 ай бұрын
At minute 11:00 you are getting the error causing by the version. I get a different error where it says, that there is no matching constructor for video mode. I also don't have the dylib files, when I build with make. Is there a newer version or am I missing something? Thanks for your help. Lesson number 3 worked perfectly for me 😄
@MikeShah
7 ай бұрын
I'm building with sfml 2.5.1 -- glad it worked for you!
@damansharma358
8 ай бұрын
thanks!
@MikeShah
8 ай бұрын
Cheers!
@roiqk
Жыл бұрын
Thank you so much!
@MikeShah
Жыл бұрын
You are most welcome!
@ExGamified
2 жыл бұрын
Hey mike, can u make a video about "building gcc from source in m1 mac" , the reason is: brew changes the permission to root admin where it lives which definitely can trigger security flaws.
@MikeShah
2 жыл бұрын
That's a good idea :)
@ExGamified
2 жыл бұрын
Looking forward to learning more from you.
@MikeShah
2 жыл бұрын
@@ExGamified Cheers!
@IsaacCohen-x7z
Жыл бұрын
I tried configuring into XCode instead and got the following error --> CMake Error at CMakeLists.txt:18 (project): No CMAKE_CXX_COMPILER could be found.
@tarunsharma209
11 ай бұрын
When I try to use SFML functions inside a file containing main function, they run fine, but when I use the functions inside a custom header&source file, it shows "symbol(s) not found for architecture arm64" , "linker command filed", please help!!
@MikeShah
11 ай бұрын
Probably need to make sure you're incluiding the header file when building those files -- I'm guessing you're building those files separately or through some makefile in which you are not linking the libraries.
@tarunsharma209
11 ай бұрын
@MikeShah yes you are correct, I was building them separately hence I got those errors, upon compiling and linking them together, it works perfectly fine. Thanks for your help!!
@Cbeginner007
7 ай бұрын
hi Mike I recently came across your video and I was building sfml on my Mac M2 but when I ran the code we copied from the example I got the error that the window.clear() and window.draw(shape) functions are not members of the window class. When I went and checked the documentation for sfml 2.6.1 it turned out that it was true! Should I try installing version 2.5.1 to get it working or is there a solution while using 2.6.1. Any help would be greatly appreciated
@MikeShah
7 ай бұрын
I think this might be an issue with the update that some things changed -- so perhaps it's time for an update :)
@Cbeginner007
7 ай бұрын
@@MikeShah do you think you'll upload a video soon I was working on a project and I would really appreciate it if you would make a how-to video🙏🙏
@MikeShah
7 ай бұрын
@@Cbeginner007 It might be a bit before I do sfml videos, working on other series currently, then will revisit
@Cbeginner007
7 ай бұрын
@@MikeShah main.cpp:14:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result] Window.setActive(); ^~~~~~~~~~~~~~~~ 1 warning generated. ld: library 'sfml-graphics' not found clang: error: linker command failed with exit code 1 (use -v to see invocation) I'm getting this error even though I'm using this: g++ -std=c++17 main.cpp -o prog -I/Users/afkari/SFML/include -L/Users/afkari/SFML/build/lib -lsfml-graphics -lsfml-window -lsfml-system Would you be able to shed some light on the prob please🙏🙏
@Cbeginner007
7 ай бұрын
@@MikeShah ld: library 'sfml-graphics' not found clang: error: linker command failed with exit code 1 (use -v to see invocation) I used: g++ -std=c++17 main.cpp -o prog -I/Users/afkari/sfml/include -L/Users/afkari/sfml/build/lib -lsfml-graphics -lsfml-window -lsfml-system until then can you shed some light on this please?
@alecweinhofer2220
2 жыл бұрын
It worked for me with clang but not with g++ ;(
@MikeShah
2 жыл бұрын
clang++ is the default compiler on Mac for folks, so using clang++ should be fine :)
@chilly2171
Жыл бұрын
got error main.cpp:5:29: error: no matching constructor for initialization of 'sf::VideoMode'
Hey man im getting an "We have a keyboard with no keys(1) error."
@MikeShah
2 жыл бұрын
Can you provide some more information? I am assuming you are on a M1 Mac? Wireless keyboard? QWERTY keyboard? Some more information here: developer.apple.com/forums/thread/130787
@chilly2171
Жыл бұрын
i can't even install cmake gui on mac....
@MikeShah
Жыл бұрын
Try either from brew or the install from cmake.org/install/
@ShivamBhati-h1n
Жыл бұрын
freetype/config/ftheader.h' This file is not found.
@MikeShah
Жыл бұрын
Might need to install the freetype library (installing through brew might work)
@SouDaFavelaGames
2 жыл бұрын
Hi love the videos, just wondering if you could help me solve this issue. error: no matching constructor for initialization of 'sf::VideoMode' sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); SFML/include/SFML/Window/VideoMode.hpp:61:14: note: candidate constructor not viable: no known conversion from 'int' to 'const sf::Vector2u' (aka 'const Vector2') for 1st argument explicit VideoMode(const Vector2u& modeSize, unsigned int modeBitsPerPixel = 32); ^ SFML/include/SFML/Window/VideoMode.hpp:42:23: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided class SFML_WINDOW_API VideoMode ^ SFML/include/SFML/Window/VideoMode.hpp:42:23: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided SFML/include/SFML/Window/VideoMode.hpp:52:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided VideoMode(); ^ 1 error generated. Running on Apple M1
@MikeShah
2 жыл бұрын
Looks like the video mode needs explicitly the width and height: www.sfml-dev.org/documentation/2.5.1/classsf_1_1VideoMode.php
@foxy8490
2 жыл бұрын
Not sure if you're still having this issue, but I got around the same problem by explicitly passing a Vector2u instead of ints: #include ... sf::Window window(sf::VideoMode(sf::Vector2u(800, 600)), "My window"); I don't know enough to know if there's something I should do to make the old way work or if the implementation changed and it requires Vector2u now
@319nsor3
Жыл бұрын
@@foxy8490 I have the same issue but I don't know what I do, I change the file vim sgml.cpp ,but don't recognize #include I so confusing. thanks for you help.
@dilnaz6834
Жыл бұрын
@@foxy8490 thank you so much for sharing. i also had this problem, now it works!
@elkabetzroy
9 ай бұрын
Hi, say I have installed SFML on my Mac (with M1) using brew, and now I would like to create a new project while working with CMake. Is there a way to configure everything I need for my project by creating a CMakeLists.txt in the project home directory (without configuring anything using the cmake gui)? I am asking because I followed you other video on installing SFML with brew but tried to add the `include` and `lib` dirs paths into my CMakeLists.txt file and I still get this `fatal error: 'SFML/Graphics.hpp' file not found #include ` error. Is there a way to solve this through the project CMakeLists.txt itself? thank you!
@MikeShah
9 ай бұрын
cmake does have some primitives for this (e.g. FIND_PACKAGE(SFML)), but I have not setup sfml with cmake.
@elkabetzroy
9 ай бұрын
@@MikeShah I see, thanks anyway, the videos are great!
Пікірлер: 53