SDL 2 and vim

Hey, so I have a decent amount of experience in C++ and some C programming, I've used BASIC many years ago and created little pgm based games and I wanted to do it again in this C++. So I installed SDL 2.0 and now I am not quite sure how to use the libraries and compile the code with it. I'm pretty new to the Ubuntu coding world, as I used to use Visual Studio which was much easier to use external libraries. I am using Ubuntu 13.10, and Vim with g++ for my coding uses.

Thanks ahead of time
so you just have to learn how to use the gnu compiler:
$ g++ -std=c++11 your_dot_cpp_files.cpp -o target executable -lsdl
Use `sdl2-config --cflags` when compiling and `sdl2-config --libs` when linking. If you are compiling and linking in the same command you can use `sdl2-config --cflags --libs`.

g++ -o run main.cpp `sdl2-config --cflags --libs`
I tried both ways and I get an error from the compiler, either 'sdl2-config --clfags --libs doesn't exist or -lsdl doesn't exist.

I'm pretty sure I installed correctly. used apt-cache search libsdl2 and sudo apt-get install *

But thanks for the help, i apologize I'm still very uncertain about a lot of linux information
Make sure you use the right kind of quote characters. It should be ` and not '. Also --clfags should be --cflags.
That worked, thank you so much
Topic archived. No new replies allowed.