Page 1 of 2

Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 2:45 pm
by StoveBacon
Hey i'm having trouble getting SFML working in Dev-c++.
I followed http://www.sfml-dev.org/tutorials/1.6/start-cb.php that tutorial and I get no errors but the window just flashes and closes right after I compile it.
If I run the exe it says that i'm missing the sfml-graphics.dll, and when I put sfml-graphics.dll into the same folder and run it again I get libgcc_s_dw2-1.dll was not found. I checked my compiler setting and I have it set to get the library files from my lib folder witch has all the sfml-graphics.dll. can someone help please?
thanks.

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 2:48 pm
by epicasian
Have you tried linking statically instead of dynamically?

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 2:53 pm
by StoveBacon
Hate to sound stupid, but how do you do that.

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 2:57 pm
by epicasian
KeithStoffel wrote:Hate to sound stupid, but how do you do that.
Instead of linking to something like "sfml-system-d.lib" link to "sfml-system-s-d.lib". And don't worry dude, we all have a noobie past:D

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 2:59 pm
by StoveBacon
1. i originally had it only link -lsfml-system but changing to to -lsfml-system-s-d didnt help.

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 3:05 pm
by epicasian
Is this the first time you've setup an IDE? Because I googled the DLL error you originally posted, and it said that's caused by GCC not being setup properly. (or something along those lines).

<preference>
The Dev-C++ project has been abandoned, and the last version I used had A TON of bugs that literally stopped me from doing anything productive. I suggest you switch to Code::Blocks or, if you're on Windows, Visual Studio Express.
</preference>

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 3:08 pm
by StoveBacon
I set up Dev a long time ago and I've never had problems with SDL or Allegro. But i guess it's time to move on.
Visual Studio Express here I come!

EDIT: 2008 or 2010?

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 3:25 pm
by epicasian
Well, the IntelliSense in VS2010 works a lot better than in 2008. 2010 is a bit slower loading up. Also, for 2010, you would have to compile SFML yourself, but if you want 2010, I can give you my builds of the SFML *.libs.

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 5:31 pm
by StoveBacon
well, I've gotten vc++ installed and i can get the first program that uses the sf::clock working but when i try using render windows Just get some errors :/

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 5:54 pm
by epicasian
Such as? I need more info to help:D

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 6:10 pm
by StoveBacon
error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main

i basically get that error for every SFML function thats called

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 6:11 pm
by epicasian
Are you linking to sfml-window.lib ? ;)

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 6:13 pm
by StoveBacon
sfml-system.lib and sfml-graphics.lib...

ok i added sfml-window.lib and i went from 6 to this one error:
general error c101008a: Failed to save the updated manifest to the file ".\Debug\SFMLtest2.exe.embed.manifest". The parameter is incorrect.

and if i just try to straight up run it i get "sfml-window.lib can not be found"

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 6:24 pm
by epicasian
Hm. Are you using VS2008? Is the link order like this: "system, window, graphics" ?

Re: Getting SFML to work in Dev-c++ :/

Posted: Mon Oct 25, 2010 6:30 pm
by StoveBacon
VC2008, system, window, graphics.