How to link SDL 2 with Visual Studio on Windows (2021)

  Рет қаралды 45,030

pikuma

pikuma

Күн бұрын

A quick tutorial on how to install and configure the SDL2 library with Visual Studio under Windows 10.
For complete and comprehensive courses on computer science, programming, and mathematics visit: pikuma.com
SUBSCRIBE to learn more about computer science, programming, and mathematics topics:
/ @pikuma
Follow me on Twitter:
/ pikumalondon

Пікірлер: 134
@MsWhiskey974
@MsWhiskey974 3 жыл бұрын
Not only you showed us how to get it to work, but you also made it easy for us to remember what to do by explaining what would happen when a step was missed. Nice video.
@mateusarruda23
@mateusarruda23 2 жыл бұрын
This is the most complete and well-explained SDL tutorial that I've ever seen in many years. Congrats for the good content :)
@vaibhavtembhekar1296
@vaibhavtembhekar1296 3 жыл бұрын
Thank you So much for this, I had to go through 4 different IDEs , and kept trying until my brain was fried and finally settled on VS and IT WORKED!!!!
@poudelaayush
@poudelaayush 2 жыл бұрын
I've never been able to follow a tutorial completley because theres is always something wrong with it, but this one, I gotta say it, was so perfect, I followed the tutorial exactly as he showed, and it worked perfectly as expected, I liked and subscribed with all 3 of my accounts just because of that, thank you so much for this video.
@amineziani5546
@amineziani5546 3 жыл бұрын
I tried many tutorials and many IDEs and none worked. BUT THANKS TO THIS ONE I DID IT!!! thank you very much
@vitals8328
@vitals8328 4 жыл бұрын
This man is using a type writer as a keyboard XD Also thx for this tutorial it was very helpful
@xslimekillXxX
@xslimekillXxX Жыл бұрын
Thank you so much, I love how you run into the error before correcting them, it makes it a lot easier to learn what these error mean and how everything works!
@theundeadforever3300
@theundeadforever3300 3 жыл бұрын
Thank you so much, I've been trying to do this for a while now, and you've been the only person that has helped me to set up SDL2, the right way. Thanks, god bless man! +1 like, and 1+ sub from me.
@thomaspfaff1074
@thomaspfaff1074 3 жыл бұрын
I have three or four times tried to install SDL2 with a youtube video. And every time it's failed. I had an error and nothing works. But with your Video it's works really. YOU ARE THE BEST!!
@hihello7979
@hihello7979 4 жыл бұрын
Finally. I’ve been at this for 3 days now on linker problem. Thank you for the tutorial.
@primalaspid7197
@primalaspid7197 3 жыл бұрын
Libary installation for microsoft languages sucks... coming from pythen, one terminal command and it works. Now im trying to learn a more advanced language and i cant even get the installation done... hopefully it will work like in the video!
@bryanhilton3491
@bryanhilton3491 2 жыл бұрын
wish I could like this more than once, it was super clear and helpful thank you
@user-ql7pw7ld1n
@user-ql7pw7ld1n 6 ай бұрын
I cant explain how much grateful I am... I was running after this for long time. Finally u helped me achieve this linked to mu visual studio .. what a relief :D thank u so much
@andjelam3
@andjelam3 2 жыл бұрын
The only one tutorial that REALLY WORKS! THANK YOU SO MUCH!
@dethm0r30
@dethm0r30 3 жыл бұрын
Cheers for the tutorial. Was having a bit of troubles getting it working but it's all good now. Liked and subscribed!
@lucasantenni1328
@lucasantenni1328 2 жыл бұрын
YES IT WORKS! i've been trying to do this but none of the tutorials that i watched worked. THANK YOU VERY MUCH!!!
@rodolfoc.nascimento6301
@rodolfoc.nascimento6301 Жыл бұрын
The most complete tutorial that I've ever seen also!
@uanbu6539
@uanbu6539 Жыл бұрын
Thank you Gustavo, this is a very good and detailed video keep up the good work!
@dev_eloper
@dev_eloper 3 жыл бұрын
Wow! Thank you for the tutorial. I'm trying to import SDL2 since last year but unsuccefully. "Graças a você" I got it finally!
@pikuma
@pikuma 3 жыл бұрын
Feito!!! 🙂
@vostokkonlok6526
@vostokkonlok6526 3 жыл бұрын
Thank you, i've had errors with linking process. Very helpful!
@loganschaeffer7962
@loganschaeffer7962 2 жыл бұрын
Sure as hell saved me a couple hours. Cheers, Sir!
@samdavepollard
@samdavepollard 3 жыл бұрын
Exceptionally helpful. Thank You for sharing your knowledge.
@Vaalin
@Vaalin 3 жыл бұрын
I spent the whole afternoon chasing linker errors and options to compile because I was using the Linux subsystem shell within Visual Studio, whilst I could've just spent 15 minutes watching this video and I would've been done. I wish I had found this a lot sooner.
@LeehLeeh9317
@LeehLeeh9317 9 ай бұрын
Thank you, finally have SDL2 working!!!
@stanis.776
@stanis.776 4 жыл бұрын
Thanks for the tutorial!
@aymensaadoon6601
@aymensaadoon6601 5 ай бұрын
Thank you! beautiful tutorial
@wihcubepiano
@wihcubepiano 3 жыл бұрын
Pressed 'Like' 3 times. Thank you so much from Korea
@Plrang
@Plrang 3 жыл бұрын
I have installed SDL many times, with success. Each time I was under the impression that my way was clumsy and that there is something wrong with my head. It looks like this is the "right way" in this messed up system. I came to watch this video to find the right way;D. Well, that's a relief. I will definitely try Linux to compare. Great video
@pikuma
@pikuma 3 жыл бұрын
I'm not sure there is a "right way", as each project might require something different. This is how I install SDL global in a folder of my OS. Some projects might be betrer to install SDL locally in the project folder with the source code. I tried to be as si ple as possible for beginners, as many students suffer to understand all the steps. :)
@randomaccount407
@randomaccount407 Жыл бұрын
Great tutorial. Thanks so much!
@Strumtreppen
@Strumtreppen 3 жыл бұрын
This was super helpful
@TheSelfUnemployed
@TheSelfUnemployed Жыл бұрын
Tip for anyone who may be stuck make sure you are in Active(Debug) under configuration when you enter Project Properties
@alexeylozin7443
@alexeylozin7443 8 ай бұрын
Thanks! helped a lot!
@Lee14G
@Lee14G 3 жыл бұрын
Very very helpful video! Thank you!
@lupirite6373
@lupirite6373 Жыл бұрын
YEEEEEEEAHHHHS!!!! Thank YOU!!!! This is a beautiful tutorial.
@nicknick-mo8rf
@nicknick-mo8rf 4 жыл бұрын
Don't know if it is the steps i followed in your tutorial (i have followed many others) or the format to Windows 10i did,but ITWORKS PERFECT !!!!!!!!!!THANK YOU
@pikuma
@pikuma 4 жыл бұрын
That's great news. :)
@nicknick-mo8rf
@nicknick-mo8rf 4 жыл бұрын
@@pikuma i hope you upload some c++/SDL2 tutorials on VS.....
@PlaylistsM
@PlaylistsM 2 жыл бұрын
TY Nice work! ♥
@CabanaJoe
@CabanaJoe 2 ай бұрын
THANK YOU SO MUCH FOR THIS VIDEO!!!!
@zinovychannel3848
@zinovychannel3848 3 жыл бұрын
Thank you very much you helped me a lot.
@simon3gl609
@simon3gl609 3 жыл бұрын
awesome, now it works !! thanks a lot !
@zoxemo3838
@zoxemo3838 Жыл бұрын
MAN BEST JOB ON KZfaq!
@fernandojs27
@fernandojs27 4 жыл бұрын
Thanks! It works!
@Jeff_Okayabashi
@Jeff_Okayabashi 3 жыл бұрын
thank u man for this tutorial
@hha15623
@hha15623 2 жыл бұрын
Thank you , video very good
@pythagorasaurusrex9853
@pythagorasaurusrex9853 2 жыл бұрын
Nice! Very much appreciated.
@farhad1902
@farhad1902 2 жыл бұрын
Thank you so much!
@kaicsmm
@kaicsmm 3 жыл бұрын
hi thanks a lot, i was having a lot of problems with this, i'm from brazil and thank you once again.
@colwarsstudiobrickfilmandm8580
@colwarsstudiobrickfilmandm8580 2 жыл бұрын
very nice and clear!
@zoblai_gg
@zoblai_gg 2 жыл бұрын
thanks for your video.you'r best
@akseli7029
@akseli7029 18 күн бұрын
Thank you very much!
@khalidomar3613
@khalidomar3613 9 ай бұрын
Thank you sir, you explained everything in good way i appreciate your effort, i think this video should be added to your lua course, i couldn't use SLD in visual studio code.
@alainkisimba6094
@alainkisimba6094 3 жыл бұрын
thanks very much it's too helpful
@Ririroa
@Ririroa Ай бұрын
life saviour, thank you soooo much
@nizd3128
@nizd3128 3 жыл бұрын
Brilliant thank you very much.
@damanistewart1730
@damanistewart1730 3 жыл бұрын
thank you so much for this
@JakkMyMan
@JakkMyMan 2 жыл бұрын
Could you do a tutorial for this on VSCode? This was really helpful, thanks!!
@user-db5ch9sq5s
@user-db5ch9sq5s Жыл бұрын
Thank you!!!
@kingofthegames7179
@kingofthegames7179 2 жыл бұрын
thank you!
@FB-eq9vl
@FB-eq9vl 3 жыл бұрын
John Purcell brought us here... thanx mate, great vid.
@pikuma
@pikuma 3 жыл бұрын
Hi there. I am not sure who that is. Is this a C++ class?
@FB-eq9vl
@FB-eq9vl 2 жыл бұрын
@@pikuma yeah man.. free C++ course at Udemy.
@heyifyoureseeingthisyouare1537
@heyifyoureseeingthisyouare1537 4 жыл бұрын
Underrated tutorial, omg, great job
@AntekElektronik
@AntekElektronik 3 жыл бұрын
do I need to do this whenever I want to make a new project with SDL?
@nguyenken3548
@nguyenken3548 Жыл бұрын
Thank you ❤
@joegoosebass3958
@joegoosebass3958 Жыл бұрын
Excellent!
@pikuma
@pikuma Жыл бұрын
Many thanks!
@ullaskunder
@ullaskunder 3 жыл бұрын
sir can you please make a video on how to setup SDL project in Vs Code
@codeinfinite2988
@codeinfinite2988 3 жыл бұрын
THAAAANKS ALOT SIR
@pustai1627
@pustai1627 3 жыл бұрын
dude u are a fk god at explaining. Thank you so much, it finally worked out!
@BitTinker
@BitTinker 3 жыл бұрын
python: "pip install xy" C++: short tutorial 15:00 min Sad that is has to be that complicated with C++ but THANK YOU anyway. It worked :)
@pikuma
@pikuma 3 жыл бұрын
Linux: "sudo apt install libsdl2-dev" MacOS: "brew install sdl2" It is not C++... it is Windows. :)
@Dezomm
@Dezomm 3 жыл бұрын
@@pikuma I'm starting to understand why programmers don't like using windows :)
@thewanderingidiot2642
@thewanderingidiot2642 3 жыл бұрын
I find sdl set up easy than sfml, thanks for the tutorial
@iGasteiz
@iGasteiz 3 жыл бұрын
Thanks!!!
@IndesirableShadow
@IndesirableShadow 2 жыл бұрын
Thank bro
@AkimboFennec
@AkimboFennec 3 жыл бұрын
I did everything like he said but i still get an error of 1 unresolved externals and the system cannot find the file specified. Why is this happening, i told visual studio everything about where to find the librariries.
@detroit1988
@detroit1988 Жыл бұрын
Thanks for your tuto. I have followed others with vscode +mingw without success. Note: I have to put the x64 libs because the x86 are not accepted (now ?) by VC.
@noeelq
@noeelq 3 жыл бұрын
Thank you...
@chrisgougis2913
@chrisgougis2913 3 жыл бұрын
I have two error remaining : LNK2019 the external symbol not solved _imp_fprintf in the _ShowError function but this tutorial is good
@moataz-bellahradwan3526
@moataz-bellahradwan3526 3 жыл бұрын
thanks a lot
@Veso266
@Veso266 2 жыл бұрын
Thank you so much, damm linker, I totaly forgot I need to care for it as well :) BTW: How do you setup linker with Cmake? (If instead of creating new project, you create new cmake project (visual studio has a template for that) Because I was trying to use find_package(SDL2 REQUIRED) But it didnt find a thing, then after manualy specifying include and library dir the linker complained and not sure how to tell the linker where to look with cmake?
@Louthsk8er
@Louthsk8er 2 жыл бұрын
thanks
@wkvvkw
@wkvvkw Жыл бұрын
Nice tutorial! But what font are you using?
@pikuma
@pikuma Жыл бұрын
Hermit
@TheWeen344
@TheWeen344 2 жыл бұрын
you are awesome
@xesk_avgaming731
@xesk_avgaming731 3 жыл бұрын
Is it possible to use a relative path to the project directory? I've tried using $(ProjectDir) and though it works for the "Linker" properties, it doesn't for the "VC++ Directories" Thanks for the tuto, it's a life saver! *Edit: also, how could we have a dll folder inside the project? I'm planning to include other libraries, and I wouldn't like to have all .dlls dancing in my workspace
@pikuma
@pikuma 3 жыл бұрын
Sure. I think $(SolutionDir) should work.
@somebody_2837
@somebody_2837 Жыл бұрын
I couldn't find SDL.lib in the extracted SDL folder
@gabrielmanoel4434
@gabrielmanoel4434 3 жыл бұрын
hi, i'm starting in programming and I would like to know if does this development library (C ++) also allow me to program in c( A game for example)? or I will need another one?
@pikuma
@pikuma 3 жыл бұрын
SDL is actually a C library that some C++ programmers like to use. You can use SDL with both C and C++, and it's a good choice for 2D games.
@gabrielmanoel4434
@gabrielmanoel4434 3 жыл бұрын
​@@pikuma thanks for your attention man
Жыл бұрын
Obrigado!
@skinnyassc9275
@skinnyassc9275 3 жыл бұрын
if yours not including after video check next to Debug there is x64 x86 and switch it.
@dudeguyman2618
@dudeguyman2618 2 жыл бұрын
Lmao, I was struggling with this for hours, turns out I just set up the main function wrong XD
@Geckoo1337
@Geckoo1337 2 жыл бұрын
Hey! But I know you! I really liked your course about ASM under Atari 2600. Is there something that you don't know? Thank you for your explanation. I wish you the best sir ++
@bluepianist2497
@bluepianist2497 2 жыл бұрын
how i do for C++ ???
@pislify34
@pislify34 3 жыл бұрын
i have an issue : "the code execution cannot procced because SDL2.dll was not found . Reinstalling the program may fix this problem" i reinstalled the thing and it did not work
@gcpezzi
@gcpezzi 3 жыл бұрын
Hi Pislify. Look at video at 13:10 and see how I fix this .dll issue.
@pedeiksz
@pedeiksz 3 жыл бұрын
Go to Windows Settings, search for "Edit the system environment variables", click "Environment Variables...", Select "Path", click "Edit" -> "New" -> "Browse", select your sdl/lib/x64 or x86 folder -> click "ok" -> "ok" -> "ok". Restart Visual Studio and that should do the job.
@pislify34
@pislify34 3 жыл бұрын
@@pedeiksz i dd domething else i just got the files and put them in System32
@mehadihasansanto538
@mehadihasansanto538 3 жыл бұрын
Sir, I followed u and double-checked. But still I'm getting linker errors!
@SorryWhatChannel
@SorryWhatChannel Жыл бұрын
Am I missing something? Why don't you have this "SDL_main" problem? "unresolved external symbol sdl_main referenced in function main_getcmdline"
@greenary3587
@greenary3587 Жыл бұрын
SDL2.lib not found why
@isyhamsamvr1362
@isyhamsamvr1362 Жыл бұрын
I've been having troubles getting this to work with c++; does it simply not work in c++? Do I need to have it made in c?
@pikuma
@pikuma Жыл бұрын
You can probably solve that by naming your file and using the extension .cpp. I believe Visual Studio uses the extension to identify the language of the project. (at least the last time I used it was like that).
@user-wb2gu4ut7b
@user-wb2gu4ut7b 3 жыл бұрын
THAAAAAAAAAAAAAAAK YOU
@GilbusTheCoder
@GilbusTheCoder 10 ай бұрын
Legend
@greenary3587
@greenary3587 Жыл бұрын
Oh Actual my Pc Is Compatible for 64 i found problem and also i install wrong version but now i install SDL2-devel-2.24.0-VC.zip Thank You Sir From Several Days I Cann't Solve That But When I See Your Video I Solve THe Problem Again Thank You So Much
@lukasjetu9776
@lukasjetu9776 2 жыл бұрын
to anyone who gets errors that say something about _main, just ignore it and go to the next thing, which is copying the dll file
@vinniciusrosa8284
@vinniciusrosa8284 3 жыл бұрын
I have tried everything but it just not work!! Everything is correct, but it just NOT work. I am almost getting out of sdl.
@zamightybanana3830
@zamightybanana3830 2 жыл бұрын
4:25 it gave me two errors; cannot open source file "stdio.h" / Cannot open included file "stdio.h": No such file directory; what should i do?
@pikuma
@pikuma 2 жыл бұрын
Remove Visual Studio and install again, and make sure you check a box that says "C++ development".
@zamightybanana3830
@zamightybanana3830 2 жыл бұрын
@@pikuma I did check that box, i’ll try reinstalling! Thank you
@user-dj4uz2mh9q
@user-dj4uz2mh9q 5 ай бұрын
Why it said that cannot open SDL2.lib 😢
@jamisco4432
@jamisco4432 3 жыл бұрын
Roses are red, Violets are blue, I had no idea what the fuck I was doing before But now I do
@speedyg2295
@speedyg2295 Жыл бұрын
Problem is the download for VStudio isn't there any longer
@pikuma
@pikuma Жыл бұрын
It just moved to Github, but at the bottom of the page (under Assets) you'll still see a zip file for the SDL devel VC.
@speedyg2295
@speedyg2295 Жыл бұрын
@@pikuma Thanks went and got that. Installed VS and made it all the way through the video. VS eats a lot of my resources compared to VSCode. Which is what I normally use. I just will use VS to finish going through the LUA course. Since I went most of the way with VSCode when I got to this section it has been a large learning curve using Ubuntu for windows cause I could not figure out how to find the .exe file for gcc and really don't have an understanding of the makefile yet. I've just been finding out how to get the same results as you get in the end. I had to add the 64 folders on this one because I got errors using x(86). Thanks for all your help.
@summon_creeper3784
@summon_creeper3784 Жыл бұрын
@@pikuma i cant find the correct file.. all i can find is a "SDL2-2.26.0-win32-x64.zip" but this doesnt seem to be the right one since there is no folder named "include" or "lib" in there
@AntekElektronik
@AntekElektronik 3 жыл бұрын
do I need to do this whenever I want to make a new project with SDL libray?
@mendo687
@mendo687 3 жыл бұрын
I think so yes
How C++ Vector Works
1:14:34
pikuma
Рет қаралды 20 М.
Creating a Game Loop with C & SDL (Tutorial)
1:50:46
pikuma
Рет қаралды 49 М.
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 15 МЛН
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 5 МЛН
SDL 2 Tutorial 1d [SETUP] Windows and CodeBlocks Setup
12:16
Sonar Systems
Рет қаралды 57 М.
Tools to make a Game Engine in C++
48:03
pikuma
Рет қаралды 51 М.
Learning SDL2 in 48 Hours - GMTK Game Jam 2020
9:19
PolyMars
Рет қаралды 3,1 МЛН
Setup SDL c++ lib in visual studio 2022
8:51
algoLancer
Рет қаралды 7 М.
SDL2 and SDL_image CMake Package Setup (MinGW, VScode, Windows)
23:10
How to Setup SDL2 and VSCode to Start Programming OpenGL on a Mac
21:41
Independent Pixels
Рет қаралды 22 М.
Welcome to Ray Tracing
23:48
The Cherno
Рет қаралды 192 М.
Setting up SDL2 in Visual Studio 2019 - SDL2 Tutorial
9:07
Playing With Data
Рет қаралды 4,9 М.
Nokia 3310 top
0:20
YT 𝒯𝒾𝓂𝓉𝒾𝓀
Рет қаралды 4,2 МЛН
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 1 МЛН
Как противодействовать FPV дронам
44:34
Стратег Диванного Легиона
Рет қаралды 98 М.