Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Solved] Problem installing SFML with Code::Blocks  (Read 7190 times)

0 Members and 1 Guest are viewing this topic.

TeLMo

  • Newbie
  • *
  • Posts: 16
    • MSN Messenger - thvs2live.it
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« on: October 08, 2011, 08:28:53 pm »
Hey ya fellows, I was trying to install the SFML 1.6 to use with Code::Blocks following this tutorial: http://www.sfml-dev.org/tutorials/1.6/start-cb.php but I had some problems. I'm using Code::Blocks 10.5.

Trying to compile that sample from the tutorial I'm getting the following erros: http://dl.dropbox.com/u/32400576/sfml.txt

Do someone know what I'm doing wrong?  :?
Zombie Offensive - Development blog
http://zombieoffensive.blogspot.com/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
[Solved] Problem installing SFML with Code::Blocks
« Reply #1 on: October 08, 2011, 08:38:27 pm »
Are you compiling for C and not C++? Otherwise, make sure g++ is properly installed and your files have a C++ extension (for example .cpp).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

TeLMo

  • Newbie
  • *
  • Posts: 16
    • MSN Messenger - thvs2live.it
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #2 on: October 08, 2011, 08:57:25 pm »
Quote from: "Nexus"
Are you compiling for C and not C++? Otherwise, make sure g++ is properly installed and your files have a C++ extension (for example .cpp).


You were right, but now I'm trying to compile a .cpp file I'm getting another error.  :cry: Check this one: http://dl.dropbox.com/u/32400576/sfml2.txt

I have no idea why I'm getting this problem, I think I did everything alright and I copied exactly the same code from the tutorial.
Zombie Offensive - Development blog
http://zombieoffensive.blogspot.com/

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #3 on: October 08, 2011, 10:05:14 pm »
You aren't linking to SFML's System component.
I use the latest build of SFML2

TeLMo

  • Newbie
  • *
  • Posts: 16
    • MSN Messenger - thvs2live.it
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #4 on: October 08, 2011, 10:37:08 pm »
Quote from: "OniLink10"
You aren't linking to SFML's System component.


Hey pal, I'm think I linked everything alright, check it:
Zombie Offensive - Development blog
http://zombieoffensive.blogspot.com/

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #5 on: October 08, 2011, 11:08:04 pm »
Your computer looks... quite broken. You should get that checked out. Also, you didn't show us your linker settings, just your include paths and proof that everything is installed properly.
I use the latest build of SFML2

TeLMo

  • Newbie
  • *
  • Posts: 16
    • MSN Messenger - thvs2live.it
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #6 on: October 08, 2011, 11:17:36 pm »
Quote from: "OniLink10"
Your computer looks... quite broken. You should get that checked out. Also, you didn't show us your linker settings, just your include paths and proof that everything is installed properly.


Dunno what you mean with "quite broken", if you're talking about the screenshot, its full of copied and pasted stuff. x) Well, I downloaded the "SFML-1.6-sdk-windows-mingw.zip" file, extracted it into C:\ and linked stuff to Code::Blocks.  And by the way, if you want to see the Linker tab too:



There are some files in the folder that aren't possible to see in the screenshot, but they're exactly equal I extracted from the file "SFML-1.6-sdk-windows-mingw.zip".
Zombie Offensive - Development blog
http://zombieoffensive.blogspot.com/

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #7 on: October 08, 2011, 11:21:22 pm »
Again, that's search directories. You still haven't shown us the linker settings.
I use the latest build of SFML2

TeLMo

  • Newbie
  • *
  • Posts: 16
    • MSN Messenger - thvs2live.it
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #8 on: October 08, 2011, 11:25:04 pm »
Quote from: "OniLink10"
Again, that's search directories. You still haven't shown us the linker settings.


So there's a misunderstood. xD This setting was blank, I fixed it setting the files from the "lib" folder. Now I'm receiving an DLL error after the compilation, its telling I don't have the sfml-system.dll, I'll see if I can download it.

** EDITED **
I copied all the SFML DLLs I found in the directory to the executable's directory, its asking for "libgcc_s_dw2-1.dll" now.

** EDITED AGAIN **
I downloaded that missing DLL and now its working well, thanks fellows Nexus and OniLink10 for the help. :)
And I did some tests, the program runs well with just two DLLs: libgcc_s_dw2-1.dll and sfml-system.dll.
Zombie Offensive - Development blog
http://zombieoffensive.blogspot.com/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
[Solved] Problem installing SFML with Code::Blocks
« Reply #9 on: October 08, 2011, 11:43:00 pm »
You can also link SFML and the g++ runtime statically, then you don't have to provide the DLLs. I think it's the flag -static-libgcc (or -static-libstdc++ for the standard library).

By the way, I wouldn't download DLLs from anywhere, since they may contain malicious code, just as EXE files. Search for the DLL on your computer or get it from GNU, if possible.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

TeLMo

  • Newbie
  • *
  • Posts: 16
    • MSN Messenger - thvs2live.it
    • View Profile
[Solved] Problem installing SFML with Code::Blocks
« Reply #10 on: October 08, 2011, 11:45:09 pm »
Quote from: "Nexus"
You can also link SFML and the g++ runtime statically, then you don't have to provide the DLLs. I think it's the flag -static-libgcc (or -static-libstdc++ for the standard library).

By the way, I wouldn't download DLLs from anywhere, since they may contain malicious code, just as EXE files. Search for the DLL on your computer or get it from GNU, if possible.


I'll check it, thanks for the hint. :) And I downloaded the DLL from a SourceForge mirror, I tested it with an online tool called VirusTotal. You can check file's status in the following link: http://www.virustotal.com/file-scan/report.html?id=b35f2a8f4c8f1833f3cdec20739c58e295758ce22021d03d4335043148bd7610-1318109920
Zombie Offensive - Development blog
http://zombieoffensive.blogspot.com/

 

anything