Basically, when I’m trying to compile my program for windows on linux, I get such an error: My main function starts like this: My compiling script looks like this: And this is my file structure: Any clues on why can’t I compile it? Answer Oh, okay I was just dumb, didn’t pass the name of mai…
Tag: sdl
Writing a wave generator with SDL
I’ve coded a simple sequencer in C with SDL 1.2 and SDL_mixer(to play .wav file). It works well and I want to add some audio synthesis to this program. I’ve look up the and I found this sinewave code using SDL2(https://github.com/lundstroem/synth-samples-sdl2/blob/master/src/synth_samples_sdl2_2.c…
SDL audio randomly becomes distorted on Linux
I have a strange issue with SDL audio. It will randomly become distorted. It’s completely random, I can’t reliably reproduce it at all. Sometime it starts being distorted seconds after the program starts, other times I’ve played with the software, let it run over night and it’ll still …
How to cross-compile with SDL 2 from Linux for Windows
I tried to compile a simple C++ program that uses SDL 2 with the mingw-w64-g++ compiler on my Arch Linux (64bits). For this I downloaded SDL2-devel-2.0.4-mingw.tar.gz from here prog.cpp: Makefile: Now making gives the error: Why undefined reference to `SDL_main’ ? Although I specified -lSDL2main ? What …
gcc won’t compile SDL C Program (undefined reference to SDL functions)
I recently moved to linux and i’m having an issue with compiling SDL C programs using gcc. The command i’m using: Even by seperating sdl-config flags: I’m getting the same error: My very simple program: Answer Order of arguments to gcc matters a lot. Read about Invoking GCC (and documentatio…
‘”SDL.h” no such file or directory found’ when compiling
Here’s a piece of my current Makefile: I have libsdl installed properly, SDL.h is in /usr/include/sdl where it belongs, but it just won’t compile. I also have the line #include “SDL.h” in my .h files, but still no go. Anyone knows why? Answer If the header file is /usr/include/sdl/SDL.…