having problems in installing SDL 2

Pages: 12
Nov 22, 2014 at 9:31am
Nov 22, 2014 at 9:52am
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;
}
Nov 22, 2014 at 10:40am
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 Nov 22, 2014 at 10:45am
Nov 22, 2014 at 10:48am
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
Nov 22, 2014 at 11:51am
http://www.cplusplus.com/forum/beginner/1988/
Keep following your tutorials.
Nov 22, 2014 at 3:36pm
THAT WORKED!!!!!! :D
thank you very much man you really help me :)
Topic archived. No new replies allowed.
Pages: 12