I had a problem with Visual Studio error LNK1561, so I investigated and found out, that as soon as I uncomment the #include part of code for the SDL headers, main turns into a macro, therefore it becomes an invalid entry point. I was thinking anyone here would have a fix for this problem. I'm posting the code here as well:
#include <iostream>
#include <SDL.h>
#include "SDL_image.h"
int main(int argc, char *argv[])
{
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
{
std::cout << "Crappy error: " << SDL_GetError() << std::endl;
}
SDL_Window* window = SDL_CreateWindow("crappy window", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0);
/*You have created a variable named window which is in the type of SDL_Window,
SDL_Create Window creates a window and it's attributes are inside the (), the first
one is the title, next is the x coordinate, then the y coordinate, then the width
of the window, the height of the window, then the command that the window could
understand you can put SDL_WINDOW_RESIZABLE if you want the window to be resizable etc.*/
//Mind you that the (0,0) coordinate is in the top left of the screen so the greater the x value, the it moves to the right and the greater the y value, the more it moves down.
SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
SDL_Texture* texture = IMG_LoadTexture(renderer, "Resources/water_tex/sea_texture_1.png"); //texture variable
std::cin.get();
return EXIT_SUCCESS;
}