how to link a 3rd party library

I know how to link a 3rd party library like SFML with Code::Blocks, but i like to use Vim for most of my coding. So what do i have to do to link a library such as SFML or Qt4 manually so I wouldn't have to for example: link the library with every IDE, or a simple text editor?

I have googled, but i am not sure what to google, like what is static linked and dynamically linking that i keep returning on a google search?

OS: Ubuntu 12.04
Last edited on
closed account (18hRX9L8)
I'm not sure if this is right, but if you want to link SFML/anything with Code::Blocks/anything, then you have to go to compiler settings and create a directory for where the SFML/anything is residing. Or you could just copy SFML/anything N times to N different include folders. Either way should work.

EDIT: You could also include the libraries' path. on the program you are writing. That is probably the fastest way to do it.
Last edited on
the fact that you said your not sure, idk. My idea was that i might have to add the paths as an arg to the g++ command, or make an alias? Not sure.

However this sounds like it might be right
@usandfriends
then you have to go to compiler settings and create a directory for where the SFML/anything is residing


i tried giving the argument to g++, but i still get the error no such file or directory

-I/usr/include/qt4/QtGui

Last edited on
Topic archived. No new replies allowed.