|
OK, I'm doing this project in a book, and it requires the SDL library. I'm using Microsoft Visual Studio 2005 Express. Here is the code:
#include <SDL.h>
int main(int argc, char* argv[])
{
subsystem
if(SDL_Init( SDL_INIT_VIDEO ) < 0)
return -1;
SDL_Surface* screen = SDL_SetVideoMode(640, 480, 0, 0);
SDL_WM_SetCaption("Hello World", "Hello World");
SDL_Surface* temp = SDL_LoadBMP("data\\textures\\sdl_logo.bmp");
SDL_Surface* bg = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
SDL_Event event;
bool quit = false;
while(!quit)
{
for an event
if (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT:
quit = true;
break;
case SDL_KEYDOWN:
switch (event.key.keysym.sym)
{
case SDLK_ESCAPE:
quit = true;
break;
}
break;
}
}
SDL_BlitSurface(bg, NULL, screen, NULL);
SDL_UpdateRect(screen, 0, 0, 0, 0);
}
SDL_FreeSurface(bg);
SDL_Quit();
return 0;
}
|
|
And this is my error:
------ Build started: Project: Project3, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1561: entry point must be defined
Build log was saved at "/forum/file/cDocuments_and_SettingsblahblahMy_DocumentsVisual_Studio_2005ProjectsProject3Project3DebugBuildLog.htm"
Project3 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can anyone help me with this?
|
|
|
|
|
|
|
// |