So I am trying to make game in C using SDL2 (both i686-w64... and x86...)
This is code I have:
#include "include/SDL2/SDL.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) return -1;
}
and error:
PS C:\Users\Olex7\OneDrive\Pulpit\Game> make
gcc -c -g src/main.c -o src/main.o
gcc src/main.o -g -o build/game
src/main.o: In function `SDL_main':
C:\Users\Olex7\OneDrive\Pulpit\Game/src/main.c:7: undefined reference to `SDL_Init'
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:7: build/game] Error 1