[Linux] Mint
I wrote the following code from an SDL book I have and it seems to be building just fine but when I go to run the program I get this error -> "Launch failed, Binary not found." I used Eclipse as my IDE and the setting are adjusted to the book's specifications.
Build feedback
10:56:43 **** Incremental Build of configuration Debug for project 2.1-Surfaces ****
make all
make: Nothing to be done for 'all'.
10:56:43 Build Finished (took 65ms)
Debug Directory Contents
main.d main.o makefile objects.mk sources.mk subdir.mk
Code
#include <SDL/SDL.h>
SDL_Surface *image = NULL;
SDL_Surface * backbuffer = NULL;
int main(int argc, char *argv[])
{
// Init SDL
if(SDL_Init(SDL_INIT_EVERYTHING) < 0)
{
printf("SDL failed to initialize!");
SDL_Quit();
return 0;
}
backbuffer = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE);
SDL_WM_SetCaption("SDL!!!", NULL);
// load the image
image = SDL_LoadBMP("graphics/image.bmp");
if(image == NULL)
{
printf("Image failed to load!\n");
SDL_Quit();
return 0;
}
// draw the image
SDL_BlitSurface(image, NULL, backbuffer, NULL);
SDL_Flip(backbuffer);
// wait
SDL_Delay(3000);
// finish
SDL_FreeSurface(image);
SDL_Quit();
return 1;
}