Help about SDL_image & SDL_ttf!?

Well the problem goes as follows:

I just can’t make SDL_Image to work with Visual Studio 7 NET

To notice, I have included SDL_Image.h in the project directory,
SDL_image.dll,
SDL_main.lib,
SDL.lib,
SDL.dll,
LIBpng1.dll

And the damn program works when I include the .h (works without that
SDL_image.h (when I dont use it)).
But!!! When i use the IMG_Load function, it reports errors…
HELP!
This is the source code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL.h>

#include “SDL_image.h”

int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(800, 600, 32,
SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN);
SDL_Surface *screen;
SDL_Surface *screen=IMG_Load(“24P_Arial_Blue.png”);
}

I receive following errors:

program.obj : error LNK2019: unresolved external symbol _IMG_Load
referenced in function _$E7
Debug/test.exe : fatal error LNK1120: 1 unresolved externals

So please help!

Well the problem goes as follows:

I just can’t make SDL_Image to work with Visual Studio 7 NET

To notice, I have included SDL_Image.h in the project directory,
SDL_image.dll,
SDL_main.lib,
SDL.lib,
SDL.dll,
LIBpng1.dll

And the damn program works when I include the .h (works without that
SDL_image.h (when I dont use it)).
But!!! When i use the IMG_Load function, it reports errors…
HELP!
This is the source code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL.h>

#include “SDL_image.h”

int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(800, 600, 32,
SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN);
SDL_Surface *screen;
SDL_Surface *screen=IMG_Load(“24P_Arial_Blue.png”);
}

I receive following errors:

program.obj : error LNK2019: unresolved external symbol _IMG_Load
referenced in function _$E7
Debug/test.exe : fatal error LNK1120: 1 unresolved externals

So please help!

Hello Tonci,

T> I receive following errors:

T> program.obj : error LNK2019: unresolved external symbol _IMG_Load
T> referenced in function _$E7
T> Debug/test.exe : fatal error LNK1120: 1 unresolved externals

T> So please help!

Sure, you’re not linking with the SDL_Image.lib file. I don’t have
.NET installed here at home, so I can’t talk you through it, but you
need to right-click on the project in the Solution Explorer and add
the .LIB file to the linking section. You may want to copy
SDL_image.lib from where you compiled it into your project, that’s up
to you! :slight_smile:

Neil.