Qt Creator / QMake Linker Libraries

Matthew H picture Matthew H · May 26, 2010 · Viewed 7k times · Source

I'm using SFML, and I want to use Qt Creator in conjunction with it. When I'm compiling manually, I supply the following arguments to the linker -lsfmlsystem -lsfmlwindow.

How do I do this if I'm using Qt Creator and (I think) QMake?

Answer

Troubadour picture Troubadour · May 26, 2010

Just add

LIBS += -L/path/to/sfml -lsfmlsystem -lsfmlwindow

to the .pro file.

You can open project files with QtCreator from the Projects view of the sidebar or searching for it via Ctrl-K. (BTW, the sidebar is not the list of icons down the left, it's the pane to the right of that which can be shown/hidden with Alt-0.)