SFML community forums
Help => General => Topic started by: HelpMe on April 01, 2011, 03:53:09 pm
-
Guys please help me because I am either very dumb or super dumb.
I can't integrate SFML w/ Code::blocks. I download Code::blocks without the MinGW. Then i follow the link and download mingw-with-gcc-4.4.zip as recommended. Then i enter the sample code compile and it runs nicely. But when i go the the project folder and try to run the binary file as a standalone application i get this error: This application has failed to start because libgcc_s_dw2-1.dll was not found. Re-installing the application may fix the problem.
How do i fix that :!:
-
The DLL is located in mingw\bin. Copy it next to yuor executable, or add its path to the PATH environment variable.
-
OK that worked nicely , but do i have to copy that .dll file to every executable i make with SFML?
-
You can use the "-static-libgcc" linker flag to get rid of this DLL.
-
Laurent i appreciate all your timely and concise replies but could you please tell me how exactly i use that "-static-libgcc" linker flag.
Big thank you.
-
(http://www.synthedit.com/sdk3_docs/images/code-blocks4.png)
-
Laurent that really worked, I can't express my gratitude. Now I feel I can begin exploring SFML.
I have 2 questions however.
1) I find my self continuously going to Project -> Build Options... -> Linker Settings -> Other linker options and type:
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s
-static-libgcc
When i quit the project, exit Code::blocks or just open a new project i have to go to Project -> Build Options... again and type the same linker libraries (they don't stay).
Is there a way to keep the libraries there for every project i make.
2) I noticed that whenever i execute an SFML .exe file that has its own window a command line window opens up as well ( both for debug and release versions).
Is it possible to get rid of the command line window?
-
Is there a way to keep the libraries there for every project i make.
This is really a project-specific thing, globally linking all your projects to SFML would make no sense.
Is it possible to get rid of the command line window?
Create a GUI/Win32 (whatever it is on Code::Blocks) project instead of a console project.
-
1) You need to specifically save the project. EDIT: Didn't read properly. You can use the Code::Blocks SFML preset to do that.
2) -mwindows to linker flags.
-
Well, I guess that's all I had to ask and I'm pleased I got my questions answered in a quick, concise and professional manner.
Big thank you to you Laurent and Svenstaro.
Laurent you are a genius. Keep up the good work.