after the last 2 days, I returned to OpenGL to get it working. Almost got it as well. (Why do I say almost? It made a window once) Problem is now it won't work at all. Something to do with Undefined references. Below is my code
#include <iostream>
#include <string>
#include <sstream>
#include <stdlib.h>
#include <stdio.h>
#include <ctime>
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include "map.h"
using namespace std;
int main(int argc, char **argv)
{
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
SDL_Window *window = SDL_CreateWindow("Tycoon Example",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_OPENGL);
SDL_GLContext glcontext = SDL_GL_CreateContext(window);
if (window == NULL)
{
printf("Could not create window: %s\n", SDL_GetError());
return 1;
}
Game_Map world = Game_Map(20,20); //Ignore this. It is class that is included in map.h
return 0;
}
I am unsure what is causing this. I have kept the code at a basic complexity to cut down external influences. Can you think of what may cause this? My laptop seems to be x64 but I am unsure as there are program folders for x86 as well. But my focus is solving what this error is meaning and what could cause it. Any advice?