SFML community forums

Help => General => Topic started by: Rimdeker on May 20, 2012, 04:05:59 am

Title: KDevelop
Post by: Rimdeker on May 20, 2012, 04:05:59 am
Hello, do you gents know how to link SFML KDevelop 4.X ?

I did install SFML according to the installation manual in the Linux package and KDevelop seems to find the header-files ( http://dl.dropbox.com/u/61926969/snapshot4.jpg ).

However, when I try to build the (bad) testcode I get an error (http://dl.dropbox.com/u/61926969/snapshot5.jpg) and I think it's a linking error.

Thanks in advance.
Title: Re: KDevelop
Post by: Laurent on May 20, 2012, 09:22:45 am
Quote
Hello, do you gents know how to link SFML KDevelop 4.X ?
The exact same way as you link to any other library.
Title: Re: KDevelop
Post by: model76 on May 21, 2012, 02:18:43 am
You could also take a look at Code::Blocks, Netbeans, and Eclipse. All of those have an auto complete feature, if that is all you are looking for.
Title: Re: KDevelop
Post by: Laurent on May 21, 2012, 08:04:10 am
When you use an IDE, the first thing to do is to learn how to include and link a library. I'm surprised that nobody explains that for KDevelop on the whole internet.
Title: Re: KDevelop
Post by: jDralliam on May 22, 2012, 04:19:12 pm
KDevelop uses cmake, just add to your CMakeFiles.txt:
target_link_libraries(
     your_target_name
     -lsfml-graphics
     -lsfml-window
     -lsfml-system
 
OR, if you installed the FindSFML.cmake script,
find_package(SFML REQUIRED COMPONENTS SYSTEM WINDOW GRAPHICS)
...
target_link_libraries(your_target_name {SFML_LIBRARIES})