Original Post
Ok.. so... what?? we decided to start from the beginning since we didn't have that much... i started a new project so that i copuld build a better engine with classes and stuff.. but i have one problem with my Class Constructor.. Here's the code: [/source] And here is where I call it: [/source] And i have a problem with the lin ker... this is the output: Engine_AnimaSprite warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library Engine_AnimaSprite error LNK2019: unresolved external symbol "public: __thiscall Sprite::~Sprite(void)" (??1Sprite@@QAE@XZ) referenced in function _SDL_main Engine_AnimaSprite fatal error LNK1120: 1 unresolved externals Any Ideas please!!???? For what i see ithere's a problem with the parameters i'm passing it becauise before I didn't pass any parameters at all and it compiled and linked just fine! Thanx!
[SOURCE]
//Constructor
Sprite::Sprite( int ANCHO, int ALTO, int DIST, char* ARCHIVO )
{
//Establece principalmente, los valores pasados
//La superficie de la imagen del sprite
sprite = IMG_Load( ARCHIVO );
if ( sprite == NULL )
{
fprintf( stderr, "Hubo un error al cargar la imagen en la clase Sprite: %s\n", SDL_GetError() );
}
//Transparencia
SDL_SetColorKey( sprite, SDL_SRCCOLORKEY, SDL_MapRGB( sprite->format, 255, 0, 255 ) );
//Rect del Sprite
rctSprite.w = ANCHO;
rctSprite.h = ALTO;
rctSprite.x = 1;
rctSprite.y = 1;
//Dirección inicial del Sprite
dir = DERECHA;
}
[/SOURCE][SOURCE]
Sprite colitas( 41, 30, 1, "/data/gfx/colitas.png" );
[/SOURCE]