having problems in installing SDL 2

Pages: 12
well that fix that problem but now its says "undefined refrence to SDL_main"
while i did include the "SDL.h" + copying the SDL.dll to the debugger folder in the project
my likner setting are like this right now: -lmingw32 -lSDL2main -lSDL2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include "SDL.h"

using namespace std;

int main() {

	if(SDL_Init(SDL_INIT_VIDEO) < 0) {
		return 1;
	}

	cout << "hello" << endl;
	SDL_Quit();
	return 0;
}
Declare it as int main(int, char**)
If you didnt have any other undefined references, this should be your last step before sdl development.
Note: unless your game is really really big (>3gb of ram required) you really shouldn't need a 64bits setup. Many valve games are 32bit executables, and games like Dota2 have a 1.4gb peak of used ram through the entire match.
Last edited on
its writing in the console "hello" and instantly closing the console
its kinda work now but its quitting instantly its doesnt even ask me to press enter or something
just quitting
http://www.cplusplus.com/forum/beginner/1988/
Keep following your tutorials.
THAT WORKED!!!!!! :D
thank you very much man you really help me :)
Topic archived. No new replies allowed.
Pages: 12