Category : sdl-2

I am trying to generate a simple, constant sine tone using SDL_audio. I have a small helper class that can be called to turn the tone on/off, change the frequency, and change the wave shape. I have followed some examples I could find on the web and got the following: beeper.h #pragma once #include <SDL.h> ..

Read more

I have an error in SDL2 compiler in sublime text3. error: C:/SDL2-w64/lib/libSDL2main.a(SDL_windows_main.o): In function `main_getcmdline’: /Users/valve/release/SDL/SDL2-2.0.14-source/foo-x64/../src/main/windows/SDL_windows_main.c:71: undefined reference to `SDL_main’ collect2.exe: error: ld returned 1 exit status C:/SDL2-w64/lib/libSDL2main.a(SDL_windows_main.o): In function `main_getcmdline’: /Users/valve/release/SDL/SDL2-2.0.14-source/foo-x64/../src/main/windows/SDL_windows_main.c:71: undefined reference to `SDL_main’ [Finished in 5.4s] Source: Windows Que..

Read more

I’ve got a project that uses CMAKE, and needs to link SDL2. I’m trying to understand how find_package works. At one point in the past, I was able to get find_package to work by supplying my own FindSDL2.cmake, but after some new linker errors, I decided to try a different apporoach. The reading I’m doing ..

Read more

I am trying to create a graphics project in visual studio 2019 using SDL2. I managed to connect it with my visual studio using this tutorial: https://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/msvc2019/index.php I want circles, lines, rectangles etc. as my output, so need SDL_gfx for that. The problem is I cannot connect it with my project. I downloaded it from ..

Read more