VSCode SFML Setup (Windows Edition)
ฝัง
- เผยแพร่เมื่อ 7 ต.ค. 2024
- Quick tutorial showing how to install and configure Visual Studio Code, MinGW and SFML for building SFML C++ projects in CLion on Windows. This should prepare you for taking on my C++ SFML tutorials.
Here is the FindSFML script. It is the same one you'll find around the internet. Recent versions of SFML apparently do not required this script, but I had trouble in Windows without it, that is why I decided to include it. github.com/Caf...
This is the cmake-tools-kits.json file. github.com/Caf...
If you would like help setting up a different environment such as Atom or CodeBlocks, then please leave a comment. If there is enough interest, I'll do another video. Otherwise, come join the community at forums.caff.tech Someone there might be able to help you in the meantime.
This channel is supported by great people like you.
Patreon / caffeinatedtech
Ko-fi ko-fi.com/caff...
Go check out my Nibbles tutorial series where we build the classic snake game in C++ and SFML. • Nibbles - C++ SFML Tut...
-== Music By Dark Fantasy Studio ==-
Album - PIXEL Faster stronger harder (all tracks)
Thank you a lot. It took me several weeks of failing to begin using SFML, and this video solved everything I was struggling with in less than an hour
Thank you so much for the help! Glad to finally have found a tutorial that does this setup in a sensible way and actually works!
thanks a lot Sir, this video is very informative. Although I would appreciate if the background music is not as loud as it gets a bit distracting. Keep up the good work :)
When the music reminds you of Megaman.. nice one my man, gonna try it since I want to learn cpp.
Holy moly U are a god. thx too much i spend almost 2 days for setup a fucking sfml and until your videos every time i fucked up but yours is perfect
Love you❤❤❤❤
hey, great guides!
sorry if im late but i ran into a problem and cant find a fix...
after im done with everything VSCode still doesnt recognize SFML and i cant include anything from there.
i get this error: cannot open source file "SFML/Graphics.hpp"
would appreciate the help, cheers
Didnt work. it keeps pop up error messages for includepath on windows 11. On linux however, works fine out of the box, go figure.I give up
@@shavebunny Yeah, I don't use windows, or vscode so I haven't looked at it since I did the video. Some other people had troubles when they had their SFML folder on a different drive. Feel free to join the discord and drop a screenshot in.
I've tried everything and I'm still getting the "no such file or directory" error on VSCodewhenever I try to include sfml in my C++ project.
It's normally because you have your project on a different drive to SFML. Join the discord and search the comments, this has been solved for a few people.
Could you help me to set up the same project but with SATIC linking dll's, not dynamic like in this video?
thanks a lot
Thank you a ton, this was super useful. Quick question - when I started this tutorial I had a newer version on mingw installed on my system which I was using to compile other projects through cmd. I uninstalled that version and installed this version per your instructions, which seems to have messed up the method I used to compile my older projects. I used to be able to type g++ --version into cmd to see my mingw recognized, now I can only compile your project and none of my simple beginner projects. Would you happen to know of a simple explanation as to why this may be?
Hey, thanks for watching.
I think you might need to add the mingw folder into the windows path. Then you should be able to use the g++ commands from anywhere.
@@CaffeinatedTech Thanks for the quick response! I've already done that and it hasn't seemed to work, not super sure why. I installed mingw directly in the C drive as you have in this video and added C:\mingw64\x86_64-w64-mingw32\bin into my path.
I found a fix for the issue - deleted everything relating to mingw from my system and redownloaded it with an installer - then changed the file locations for cmake to where the installer put them in a slightly different file location. Now everything works.
@@abomb2939 awesome. Good job.
I have an error :
"message": "CMake Error at cmake_modules/FindSFML.cmake:359 (message):Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY
SFML_GRAPHICS_LIBRARY)",
Jump on my discord and scroll up a bit, that problem has been solved a few times. discord.gg/QTFPXK6
at 11:40, I did not see Cmake tool in my extension, so what should i do?, and I can not find kits
Sir it possible without cmake...just compiling simple project
no
@@polybiusproxy616 FYI yess it is possible... I used gcc compiler and vs code with task.json to do the trick
Outdated video I think. I can see it works for some people but I've issues with it.
Thanks for the feedback. What doesn't work these days? I'll go back and do an updated video.
I'm pretty late, but at 9:00 for some reason my path is super messed up and it's set to Jetbrains Pycharm or something, so my path isn't matching up with VS Code. Would anyone be able to tell me what the path *should* look like?
You should leave everything that is already in the path alone, and add the MinGW stuff to the end. Don't forget the semicolon.
Great video, but I ran into a problem when trying to compile the nibbles project in the FindSFML.cmake file it shows a error at line 359 about message(FATAL_ERROR ${FIND_SFML_ERROR}). I followed all of the steps in the video, so now I'm stuck?
Jump on discord and have a look back at the previous conversations. we've fixed up a few sfml and cmake problems. discord.gg/CrS5WEV9r7
Thanks for getting back to me, I definitely check it out on the discord channel. Your video has helped me a lot, because I had been struggling for months to get SFML up and running?
Could you possibly do a SFML video tutorial on setting it up on CodeBlocks?
@@charlesg.smithjr.3677 I certainly can have a look at doing that.
I got that error too, could you send me your discord link again because the old one expired, cheers!
Numerous linker errors. There are so many options out there to do the same thing, it is very difficult to determine required versus options. I have never found one tutorial that gives a working solution and explanation about how their solution works together. I am sure this is an excellent resource video but still problems.
I prefer CLion over VSCode to be honest. But I know it is popular so I thought I would help some people. If you have specific problems, feel free to join the discord, many problems have already been solved. They are mostly due to wrong version of MinGW or placing SFML in the wrong directectory. discord.gg/QTFPXK6
@@CaffeinatedTech I need another invite, if you don't mind...
does tdm gcc 32bit work with a 64bit os
I can't see why it wouldn't.
Hi, amazing video. ¿Can you do a Tutorial with atom? Pleasee.
Hey thanks for watching! I sure can do a tutorial for Atom. I actually really like Atom, I used it exclusively for a couple of years before I started my Jetbrains subscription.
Thanks for this video it very well explained , but here : 15:05 I have an error I don't think that i done somethings wrong I've check everything but it still doesn't work I've just change all the "mingw64" by "MinGW" because it's the name of my file can someone help me
Jump on the discord, we'll see if we can help you.
Here is the discord. discord.gg/D6Cs9VhK
13:29
finally doneeee..................................................Now sir I'm thinking about creating algo visualization project can you please help us with creating the skeleton or boiler plate for crating any project.......pleaseeeee
Hey that's a great idea. When I get a chance I can definitely create a 'template' to use as a starter for any SFML project. Thanks for the idea, and thank you for watching.