0

I followed the tutorial here

the code:

#include <iostream>
#include "SDL2/SDL.h"
using namespace std;
int main(int argc, char* args[]){
    cout<<"Start"<<endl;
    return 0;
}

to run the code I use:

g++ Main.cpp  -lmingw32 -lSDL2main -lSDL2 -mwindows

and then I get the error:

c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status 
Roy Varon
  • 536
  • 2
  • 5
  • 14

0 Answers0