Error LNK2019, Need help

Every time i start a new SDL project at college it works fine with linking the include, lib, VC++ etc. But when im home i do everything the same i get some stupid fucking error that i cannot fix.
So here's my problem...im trying to open a SLD windows with some text and when you press enter a new word appears on a different position, however i still havent coded it. Heres the code for the basic idea

#include <SDL.h>
#include <SDL_ttf.h>
using namespace std;

int main (int argc, char** argv)
{
SDL_Surface* screen;
SDL_Event evt;
TTF_Font* fnt;
TTF_Font* fnt2;
SDL_Surface* text;
SDL_Color txtColor;
SDL_Rect Position;
bool isRunning;

SDL_Init(SDL_INIT_EVERYTHING);
screen= SDL_SetVideoMode(640,480,32,SDL_HWSURFACE);
TTF_Init();
isRunning = true;
fnt = TTF_OpenFont("LaNegrita.ttf",32);
txtColor.r = 255; txtColor.g = 120; txtColor.b=69;
text = TTF_RenderText_Solid(fnt,"Hello",txtColor);

while(isRunning)
{
while(SDL_PollEvent(&evt)){
if (evt.type == SDL_QUIT){
isRunning = false;
}
if(evt.type == SDL_KEYUP)
{
if(evt.key.keysym.sym == SDLK_RETURN)
{
txtColor.r = 155; txtColor.b = 120; txtColor.g = 69;
text = TTF_RenderText_Solid(fnt,"Me Gusta", txtColor);
}
}
}

SDL_BlitSurface(text,NULL,screen,NULL);
SDL_BlitSurface(text,NULL,screen,NULL);
SDL_Flip(screen);
}

SDL_FreeSurface(text);
TTF_CloseFont(fnt);
TTF_CloseFont(fnt2);
TTF_Quit();
SDL_Quit();
return 0;

}



Theres nothing wrong that i can see...can someone please spot it??? also excuse me for being kinda new, ive been learning it for since september

the errors are:
error LNK1120: 5 unresolved externals

error LNK2019: unresolved external symbol _TTF_Quit referenced in function_SDL_main

error LNK2019: unresolved external symbol _TTF_CloseFont referenced in function_SDL_main

error LNK2019: unresolved external symbol _TTF_Init referenced in function_SDL_main

error LNK2019: unresolved external symbol _TTF_OpenFont referenced in function_SDL_main

error LNK2019: unresolved external symbol _TTF_RenderText_Solid referenced in function _SDL_main

This is a linker error. Basically it's saying you it can't find the code associated with these functions' names.

If the functions are provided in a library, make sure visual is aware where to find the .lib files.
If they're provided in a cpp file, add the cp file to your project.
Follow these instructions and make sure that SDL_ttf.lib is linked in your project's Additional Dependencies.

http://lazyfoo.net/SDL_tutorials/lesson03/windows/msvsnet2010e/index.php
Topic archived. No new replies allowed.