我按照教程here
进行了操作代码:
#include <iostream>
#include "SDL2/SDL.h"
using namespace std;
int main(int argc, char* args[]){
cout<<"Start"<<endl;
return 0;
}
运行我使用的代码:
g++ Main.cpp -lmingw32 -lSDL2main -lSDL2 -mwindows
然后我收到错误:
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