When i try to compile my source code, it comes up with two errors:
the first one is:
cannot find -lobjc
the second one is:
Id returned 1 exit status

Well objc is for objective-c (another language variant), so I've no idea why you would even be trying to link with it.

Well... i am not trying to link with it... i'm trying NOT to link with it... but i'm a n00b... so i don't knwo how :S

Here's my source code:

#include <SDL.h>

int main(int argc, char* argv[])
 //initialize SDL and the video system.
 if (SDL_Init( SDL_INIT_VIDEO)<0)
 return -1;
 //signal SDL to change the text of the main window to SDL "Hello World".
 SDL_WM_SetCaption("Hello world","Hello World");
 //Create an SDL_Surface object, which represents, the game window.
 SDL_Surface* screen=SDL_SetVideoMode(640,480,0,0);
 //Load the SDL logo bitmap to a temporary surface
 SDL_Surface* temp=SDL_LoadBMP("data\\structures\\sdl_logo.bmp");
 //Create the working SDL surface which matches the display format of the temporary surface.
 SDL_Surface* bg= SDL_DisplayFormat(temp);
 //Free the memory allocated to the temporary SDL_Surface.
 SDL_Event event;
 bool quit=false;
 //this is the main message loop if the game.
   //Check message qeue for an event.
   if (SDL_PollEvent(&event))
     //If an event was found.
     switch (event.type)
       //check to see if the window was closed via the "x"
       case SDL_QUIT:
       //Set the quit flag to true
      //Check the keyboard to see if the ESC key was pressed.
      case SDL_KEYDOWN:
       switch (event.key.keysym.sym)
         case SDLK_ESCAPE:
           //set our quit flag to true
   //Draw the background sprite:
   SDL_BlitSurface(bg, NULL, screen, NULL);   
   //Update the current window.

//Free the allocated memery for the background surface.

//Quit SDL and allow it to clean up everything.

//return control to windows with no errors.
return 0;

I am using dev-c++, so if any1 else is using that compiler, i would realy like help, changing this.

This article has been dead for over six months. Start a new discussion instead.