Adding libraries

Hey there!

I'm a very beginner programmer, and I know basic C++. But the problem I always seem to have when trying to add a library is I will get some error somewhere and I can't implement anything new to my program.
So for example, now I am trying to add this SDL library. I follow the instructions spot on but I still receive an error. My question for you guys:
Can you point me towards a super simple library that I can download and use in c++, and it will teach me how to implement libraries. I want to learn how to add a library to c++, but since I can never get one to work, I don't know what I am doing right/wrong.

What is the simplest library I can add?
Does this make sense? I dont know.

Thanks guys!
May you show the file?
My code is extremely simple, the problem is the error when I build it:

#include "SDL.h"

int main( int argc, char* args[] )
{
//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );

//Quit SDL
SDL_Quit();

return 0;
}

Gives error:
1>main.obj : error LNK2019: unresolved external symbol _SDL_Quit referenced in function _SDL_main
1>main.obj : error LNK2019: unresolved external symbol _SDL_Init referenced in function _SDL_main
1>MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\Alex\Documents\Visual Studio 2010\Projects\SDLtut\Debug\SDLtut.exe : fatal error LNK1120: 3 unresolved externals

I really don't know how to read these errors, I thought I had all libraries linked up
You haven't linked the libraries at all.
Hi! I think you should link the libraries to your codes using your compiler. See for more examples: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/index.php . And by the way, there are two ways to link your libraries, statically and dynamically, but you dont have to worry much about that for now though. :)
Wow thanks so much rjvc! That was exactly what I was looking for and now I can play with graphics!

Thanks for your help!
Topic archived. No new replies allowed.