Archived

This topic is now archived and is closed to further replies.

Iron Eye

Cannot Compile SDL app in VC++6

Recommended Posts

I''ve just started trying to use VC++ 6 here at school for the first time. I''m trying to compile a very simple SDL app and I''m getting errors. I''ve followed all of then instuctions on cone3d with no help. Here''s the code:
#include <SDL/SDL.h>
#include <stdlib.h>
#include <stdio.h>

//using namespace std;

int main()
{
	SDL_Init(SDL_INIT_VIDEO);

	SDL_Quit();
	return 1;
}
And here''s the error: --------------------Configuration: SDL1 - Win32 Debug-------------------- Linking... sdlmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol _SDL_main Debug/SDL1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. SDL1.exe - 2 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
You probably haven't linked the library files in your project. Go to Project > Settings > Link and add sdl.lib and sdlmain.lib before kernel32.lib under "Object/library modules".

If that doesn't help, do you have the SDL.dll file available to your .exe file?

[edited by - Goldfish on November 17, 2003 3:33:41 PM]

Share this post


Link to post
Share on other sites