MSYS2 - Mingw64 and SDL2 Setup For C Programming on Windows

preview_player
Показать описание

What is MYSYS2?
MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

What is SDL2?
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

Get MSYS2:

Get SDL2

Commands used in the video:
pacman -Syu

pacman -S git mingw-w64-x86_64-gcc mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_mixer mingw64/mingw-w64-x86_64-SDL2_image mingw64/mingw-w64-x86_64-SDL2_ttf mingw64/mingw-w64-x86_64-SDL2_net mingw64/mingw-w64-x86_64-cmake make

gcc "name of file".c -o "executable name".exe $(pkg-config --cflags --libs sdl2)

Become a member and support the channel + perks!

Join me on - Odysee Invite Code

*** Social / Information ***

#cprogramming #MSYS2 #sdl2 #raven67854
Рекомендации по теме
Комментарии
Автор

Thank you so much buddy! I have been tried lots of videos, but couldn't solve this, but after your video it's completely fine and running every thing ok! Take love bro <3

pritom_x
Автор

Several times over the years I've had to resort to using mingw to build existing projects that nobody bothered to make run in Windows.
Typically because I have to collaborate with people who refuse to daily drive Linux for whatever misguided reason :P
But every time I have to relearn how to troubleshoot the absolute arcane mess that is mingw/msys and Windows in general, because I can't remember that information for more than like a week.
This video made getting it up and running this time less of a headache. So thank you.

delphicdescant
Автор

Oh my, i'm sogreatfull to you. I've been messing around with SDL2 last 3 days and it finally worked. Thank you very much. Oh and you missspeled comand in
description, it should be gcc "name of file".c -o "executable name".exe $(pkg-config --cflags --libs sdl2)

stalkeraza
Автор

Great video! Straight-forward and everything works. Now I can work on a Snake game clone!

kelanriley
Автор

sdl2 part from "search in video" transcript
1:26

yash
Автор

When is the next l4d2 hammer tutorial coming?

Megajaybreaker
Автор

Do you know how to debug SDL2 with gdb in msys2, if that's possible? I'm trying to debug the example program you use in this video but I'm getting this error: No such file or directory. It's like gdb's looking in the wrong file. I'm compiling with the same command that you used, only I added the -g flag for debugging information.

yogxoth
Автор

Why is programming C on Windows such a massive pain? You're basically forced to use Visual Studio and MSVC, or you will have tons and tons of issues, and every time you think you've fixed it, another new issue pops up.

yogxoth
Автор

Hello from Ukraine, this is the only source that helped me get c++ and sdl2 up and running!
Thank you!
🥲

fratellostuff