codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Help with SDL!  a3orange at 14:41 on Sunday, February 12, 2006
 

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?










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  perl script help needed
•  onChange issue
•  perl remote execution
•  Chat application
•  How to send multiple perameters in SOAP request.
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007