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)

ความคิดเห็น • 49

  • @МаксимСамолюк-с7с
    @МаксимСамолюк-с7с 3 ปีที่แล้ว +7

    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

  • @DuckDaysDave
    @DuckDaysDave 6 หลายเดือนก่อน +1

    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!

  • @bilalkashif8169
    @bilalkashif8169 2 วันที่ผ่านมา +1

    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 :)

  • @RADIOSCATRACHASUTAN
    @RADIOSCATRACHASUTAN 3 ปีที่แล้ว +5

    When the music reminds you of Megaman.. nice one my man, gonna try it since I want to learn cpp.

  • @efeburako.9670
    @efeburako.9670 ปีที่แล้ว +3

    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

  • @muhammadahmadkhan3304
    @muhammadahmadkhan3304 ปีที่แล้ว +1

    Love you❤❤❤❤

  • @ronamar20
    @ronamar20 2 ปีที่แล้ว +3

    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

  • @shavebunny
    @shavebunny 12 วันที่ผ่านมา +1

    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

    • @CaffeinatedTech
      @CaffeinatedTech  12 วันที่ผ่านมา

      @@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.

  • @Scriabin_fan
    @Scriabin_fan ปีที่แล้ว +1

    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.

    • @CaffeinatedTech
      @CaffeinatedTech  ปีที่แล้ว

      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.

  • @onemoremagistr
    @onemoremagistr ปีที่แล้ว +1

    Could you help me to set up the same project but with SATIC linking dll's, not dynamic like in this video?

  • @maydirmen3708
    @maydirmen3708 2 ปีที่แล้ว +1

    thanks a lot

  • @abomb2939
    @abomb2939 3 ปีที่แล้ว +1

    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?

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว +1

      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.

    • @abomb2939
      @abomb2939 3 ปีที่แล้ว

      @@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.

    • @abomb2939
      @abomb2939 3 ปีที่แล้ว +1

      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.

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว +1

      @@abomb2939 awesome. Good job.

  • @AgentRex42
    @AgentRex42 2 ปีที่แล้ว +1

    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)",

    • @CaffeinatedTech
      @CaffeinatedTech  2 ปีที่แล้ว

      Jump on my discord and scroll up a bit, that problem has been solved a few times. discord.gg/QTFPXK6

  • @dienau6313
    @dienau6313 ปีที่แล้ว

    at 11:40, I did not see Cmake tool in my extension, so what should i do?, and I can not find kits

  • @ullaskunder
    @ullaskunder 3 ปีที่แล้ว +1

    Sir it possible without cmake...just compiling simple project

    • @polybiusproxy616
      @polybiusproxy616 3 ปีที่แล้ว

      no

    • @ullaskunder
      @ullaskunder 3 ปีที่แล้ว +1

      @@polybiusproxy616 FYI yess it is possible... I used gcc compiler and vs code with task.json to do the trick

  • @CashHughes-vc8uv
    @CashHughes-vc8uv 4 หลายเดือนก่อน

    Outdated video I think. I can see it works for some people but I've issues with it.

    • @CaffeinatedTech
      @CaffeinatedTech  4 หลายเดือนก่อน

      Thanks for the feedback. What doesn't work these days? I'll go back and do an updated video.

  • @viis
    @viis 3 ปีที่แล้ว

    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?

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว

      You should leave everything that is already in the path alone, and add the MinGW stuff to the end. Don't forget the semicolon.

  • @charlesg.smithjr.3677
    @charlesg.smithjr.3677 2 ปีที่แล้ว

    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?

    • @CaffeinatedTech
      @CaffeinatedTech  2 ปีที่แล้ว

      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

    • @charlesg.smithjr.3677
      @charlesg.smithjr.3677 2 ปีที่แล้ว

      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?

    • @charlesg.smithjr.3677
      @charlesg.smithjr.3677 2 ปีที่แล้ว

      Could you possibly do a SFML video tutorial on setting it up on CodeBlocks?

    • @CaffeinatedTech
      @CaffeinatedTech  2 ปีที่แล้ว

      @@charlesg.smithjr.3677 I certainly can have a look at doing that.

    • @kmhoang2910
      @kmhoang2910 2 ปีที่แล้ว

      I got that error too, could you send me your discord link again because the old one expired, cheers!

  • @johnhouser3673
    @johnhouser3673 2 ปีที่แล้ว

    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.

    • @CaffeinatedTech
      @CaffeinatedTech  2 ปีที่แล้ว

      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

    • @johnhouser3673
      @johnhouser3673 2 ปีที่แล้ว

      @@CaffeinatedTech I need another invite, if you don't mind...

  • @strike6621
    @strike6621 3 ปีที่แล้ว

    does tdm gcc 32bit work with a 64bit os

  • @germandavidplazas441
    @germandavidplazas441 3 ปีที่แล้ว +1

    Hi, amazing video. ¿Can you do a Tutorial with atom? Pleasee.

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว

      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.

  • @hugoW26
    @hugoW26 3 ปีที่แล้ว

    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

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว

      Jump on the discord, we'll see if we can help you.

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว

      Here is the discord. discord.gg/D6Cs9VhK

  • @kritischparken
    @kritischparken ปีที่แล้ว

    13:29

  • @ullaskunder
    @ullaskunder 3 ปีที่แล้ว

    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

    • @CaffeinatedTech
      @CaffeinatedTech  3 ปีที่แล้ว

      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.