SFML community forums

Help => General => Topic started by: Kitikonti553 on September 22, 2007, 10:00:55 am

Title: Compiler Help
Post by: Kitikonti553 on September 22, 2007, 10:00:55 am
im using Dev-C++ 5, and im not entirely sure how to add the SFML inlude files to the compiler, can anyone help me? :oops:
Title: Compiler Help
Post by: Mindiell on September 22, 2007, 05:21:43 pm
What includes are you trying now ?
Have you tried the first Code::Block tutorial ? C::B is the future of Dev-C++ and is based on the same techno.
Title: Compiler Help
Post by: Kitikonti553 on September 23, 2007, 12:07:39 am
yes i did try the Code::Block tutorial, but still confused.
Title: Compiler Help
Post by: Mindiell on September 23, 2007, 12:20:41 pm
The includes are in the code. Your project must be able to see files included. You have two possibilities to do that :
- copying the included files in the include directory of your copiler
- copying the included files in some place near your source

For the first case, you use #include <>
For the second, #include ""

Isn't it simple ?
Title: Compiler Help
Post by: Kitikonti553 on September 24, 2007, 05:03:07 am
well what i ment was, that i was trying to add the SFML directories to my compiler but it wasnt working, so i guess ill try just coping the files instead
Title: Compiler Help
Post by: Mindiell on September 24, 2007, 07:17:04 am
Which directory did you copy, and where ?
You have normally to copy only the include directory in the compiler's include directory, in order to end with something like :
Code: [Select]
- compiler
  |- include
     |- sfml
Title: Compiler Help
Post by: Kitikonti553 on September 26, 2007, 12:53:09 am
thats what i do, but my compiler always does 1 of 2 things: either 1) doesnt reconize the include files and gives me a linker error, or 2) reconizes them but give me a crap load of parse errors
Title: Compiler Help
Post by: Mindiell on September 26, 2007, 07:16:16 am
Ah ! Can we see those errors please ? :)
Title: Compiler Help
Post by: Kitikonti553 on September 27, 2007, 01:09:19 am
ok, i tryed that thread tutorial, now on line 17 it says "Thread.Launch();" right? well i get these linker error when i dont put "sf::" in front of it(i would also like to note i also added "using namespace sf;" to my file**): http://i137.photobucket.com/albums/q239/Kitikonti/linker_error.jpg . but when i do but add "sf::" to it, i get this parse error: http://i137.photobucket.com/albums/q239/Kitikonti/parse_error.jpg .
Title: Compiler Help
Post by: Laurent on September 27, 2007, 03:02:51 am
If you use "using namespace sf", every SFML class will be accessible in the global scope. This means that both the Thread class and the Thread instance will conflict, because they have the same name. Just change the instance name (MyThread, or whatever).
Title: Compiler Help
Post by: Kitikonti553 on September 27, 2007, 08:21:42 am
well that solves the parse errors, but i still get the linker ones
Title: Compiler Help
Post by: Laurent on September 27, 2007, 04:07:53 pm
Do you link with sfml-system ?
Title: Compiler Help
Post by: Kitikonti553 on September 28, 2007, 12:11:11 am
yeah i do
Title: Compiler Help
Post by: Laurent on September 28, 2007, 02:53:26 am
Are you linking with any other SFML library ?
Title: Compiler Help
Post by: Kitikonti553 on September 28, 2007, 04:27:33 am
i dont believe so, i just dont get it, nothing seems to be working  :?