   sdl_image issue.
  Hello all,Newcomer here. Obviously new and having an issue getting SDL_image working for me.I'm using VC++ 2008 Express, the error i get when i compile is this:"this application has failed to start because SDL_image.dll was not found."i have the libraries and includes for all of the sdl_image files loaded up into visual c++, and i also have SDL_image.lib included in linker/input with sdl.lib and sdlmain.lib. The SDL_image.dll is also copied to my project folder.can anyone help me figure out why i am getting this error?thank you in advance.P.S. Just in case here is my code as well:#include "SDL.h"#include "SDL_image.h"#include <stdlib.h>const int SCREEN_WIDTH = 640;const int SCREEN_HEIGHT = 480;SDL_Surface* gDisplaySurface = NULL;SDL_Surface* gImageSurface = NULL;SDL_Event gEvent;int main(int argc, char* argv[]){SDL_Init(SDL_INIT_VIDEO);atexit(SDL_Quit);gDisplaySurface = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, 0, SDL_ANYFORMAT);gImageSurface=IMG_Load("background.jpg");for(;;){if(SDL_PollEvent(&gEvent)==0){SDL_Rect br;br.x=br.y=0;br.w=gImageSurface->w;br.h=gImageSurface->h;SDL_BlitSurface(gImageSurface,&br,gDisplaySurface,&br);SDL_UpdateRect(gDisplaySurface,0,0,0,0);}else{if(gEvent.type==SDL_QUIT)break;}}return 0;}   
Quote:Original post by DesolisThe SDL_image.dll is also copied to my project folder.Is it in with the exe?;  It was not, i put it with the debug folder and got past that point. I figured out later that the reason why i thought the initial project folder would work was because i had placed a copy of sdl.dll into my system folder. (as near as i can gather anyway) Now i get this when i try to compile however...Unhandled exception at 0x004114f9 in My First SDL Project.exe: 0xC0000005: Access violation reading location 0x00000008.I'm afraid i'm at a loss for this one i get an arrow at this portion of my code where it seems to hang.if(SDL_PollEvent(&gEvent)==0){SDL_Rect br;br.x=br.y=0;br.w=gImageSurface->w; //Arrow here! <-------br.h=gImageSurface->h;SDL_BlitSurface(gImageSurface,&br,gDisplaySurface,&br);SDL_UpdateRect(gDisplaySurface,0,0,0,0);Thanks in advance again for any replies...i suppsoe the best way to learn to deal with errors for me must be to run blindly into every one that could possibly exist on the way through....P.S. It seems that if i run the exe straight from the debug folder for the project this works just fine. but i cannot get it to debug from VC++ without hanging on this error. why would this be?this is what i get if i try to compile as a Release.Compiling...main.cppLinking...main.obj : error LNK2001: unresolved external symbol _SDL_UpdateRectmain.obj : error LNK2001: unresolved external symbol _SDL_Initmain.obj : error LNK2001: unresolved external symbol _SDL_SetVideoModemain.obj : error LNK2001: unresolved external symbol _SDL_PollEventmain.obj : error LNK2001: unresolved external symbol _SDL_UpperBlitmain.obj : error LNK2001: unresolved external symbol _IMG_Loadmain.obj : error LNK2001: unresolved external symbol _SDL_QuitMSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16C:\Archives\Projects\My First SDL Project\Release\My First SDL Project.exe : fatal error LNK1120: 8 unresolved externalsBuild log was saved at "file://c:\Archives\Projects\My First SDL Project\My First SDL Project\Release\BuildLog.htm"My First SDL Project - 9 error(s), 0 warning(s)   ;  looks like your trying to read from a null pointer, which probably means that IMG_Load("background.jpg"); isn't able to load your image correctly, as for your release build linker errors, have you added the SDL library to your release build options?   ;  looks like your trying to read from a null pointer, which probably means that IMG_Load("background.jpg"); isn't able to load your image correctly, as for your release build linker errors, have you added the SDL library to your release build options?I didn't add the library to my release build. how dumb of me. So that compiles and runs okay....I'm assuming that this must be the pointer that causes the trouble with debug then?SDL_Surface* gImageSurface = NULL;how do i deal with this? i guess i'm not really sure. i've been glancing through a couple of my books chapters on pointers but not getting much of an idea what to do about it.Also why is it that this effects debug and seemingly not the release build? Is this the sort of thing that causes problems later on down the road in a release build if ignored?   ;  Have you tried looking at Lazy Foo's tutorials for SDL?  he does a great job explaining how to set up and use SDL.   ;  Thanks for the tip. I followed his tutorials up through everything I was trying to do (which was the first 3 ironically) it works great. I should be able to cross-reference this with my book and another tutorial I've been skimming to figure out exactly how I went wrong. Thanks for the help.   