For a multi-system project, I am trying to run SDL2 using Code::Blocks 17.12 and g++.
SDL2.dll under C:\MinGW\bin
all SDL2 header files under C.\MinGW\include\SDL
libSDL2.a and libSDL2main.a unter C:\MinGW\lib
My Program is in the folder D:\Temp\CPP:
SDL2.dll in the same folder
including folder SDL/lib:
libSDL2.a
libSDL2.dll.a
libSDL2main.a
including folder SDL/include:
all SDL header files
Linker Settings, Compiler Settings and Search Directories are as in the screenshots.
Nonetheless, for the code
#include
#include “SDL.h”
int main(int argc, char* argv[])
{
printf(“Yeah”);
return 0;
}
I get an "undefined reference to `WinMain@16’ error.
I do not see anythin I could have done wrong. Can you help me, please?