So I'm trying to compile this.
#include "SDL.h"
int main(int argc, char* args[])
{
//Start SDL
SDL_Init(SDL_INIT_EVERYTHING);
//Quit SDL
SDL_Quit();
return 0;
}
Shows me these errors:
Error 2 error LNK2019: unresolved external symbol _SDL_Quit referenced in function _SDL_main C:\Users\Scrub\Desktop\C++\SDL__tutorial\main.obj
Error 1 error LNK2019: unresolved external symbol _SDL_Init referenced in function _SDL_main C:\Users\Scrub\Desktop\C++\SDL__tutorial\main.obj
Error 3 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup C:\Users\Scrub\Desktop\C++\SDL__tutorial\MSVCRT.lib(crtexe.obj)
Error 4 error LNK1120: 3 unresolved externals C:\Users\Scrub\Desktop\C++\SDL__tutorial\Debug\SDL__tutorial.exe 1
I've tried searching these errors everywhere; tried all the supposed fixes, it still does this.
Edit - I've somewhat fixed this(By switching to x86 lib and #undef main), but now when i build and launch it, it shows an application error
The application was unable to start correctly (0xc0000007b)
Still produces almost the same errors with windows subsystem
Error 3 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup C:\Users\Scrub\Desktop\C++\SDL__tutorial\MSVCRT.lib(crtexew.obj)
Error 2 error LNK2019: unresolved external symbol _SDL_Quit referenced in function _SDL_main C:\Users\Scrub\Desktop\C++\SDL__tutorial\main.obj
Error 1 error LNK2019: unresolved external symbol _SDL_Init referenced in function _SDL_main C:\Users\Scrub\Desktop\C++\SDL__tutorial\main.obj
Error 4 error LNK1120: 3 unresolved externals C:\Users\Scrub\Desktop\C++\SDL__tutorial\Debug\SDL__tutorial.exe