1 Replies - 760 Views - Last Post: 18 February 2012 - 03:59 AM Rate Topic: -----

#1 clyde1993  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 15-February 12

SDL link error?

Posted 17 February 2012 - 02:15 PM

so i'm using the code from a tutorial to try and set up SDL on visual studio express 2010.
#include "SDL.h"  // include SDL

int main(int argc, char *argv[]) 
{

	  // the screen we will draw to. 
	 SDL_Surface *screen;
	 //  the surface to draw the bitmap on.
	 SDL_Surface *bmp; 
	 // area to draw the bitmap to.
	 SDL_Rect  targetarea;
	 
	 // initialize SDL. // I use everything as it will load video as well.
	 SDL_Init(SDL_INIT_EVERYTHING); 
	 
	 /*
	  set up the screen  pass in screen  
	  width,height,bpp and set SDL to software 
	   rendering	  
	 */
	 screen = SDL_SetVideoMode(640,480,32, SDL_SWSURFACE); 

	 // load a bitmap.
	 bmp = SDL_LoadBMP("test.bmp"); 
	 
	 targetarea.x = 10; // target x
	 targetarea.y = 20; // target y
	 targetarea.w = bmp->w; // target width
	 targetarea.h = bmp->h; // target height
	 
	 // Draw the bitmap to the target area
	 SDL_BlitSurface(bmp, NULL, screen, &targetarea); 
	 
	 // show the bitmap // double buffering
	 SDL_Flip(screen);  
	 while(1);
}  


But I keep getting this error type thing. It allows me to run the program but immediately crashes.

LINK : c:\users\user\documents\visual studio 2010\Projects\SDL2\Debug\SDL2.exe not found or not built by the last incremental link; performing full link

Is This A Good Question/Topic? 0
  • +

Replies To: SDL link error?

#2 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 994
  • View blog
  • Posts: 4,158
  • Joined: 14-February 08

Re: SDL link error?

Posted 18 February 2012 - 03:59 AM

You can read about incremental links here

The problem though is most likely that the test.bmp cannot be found. Where did you save it to?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1