SFML community forums

Help => General => Topic started by: melissa_goddard on February 02, 2012, 08:24:26 pm

Title: Exporting an SFML Project in Code::Blocks
Post by: melissa_goddard on February 02, 2012, 08:24:26 pm
Hi all

For my dissertation, I need the program I have created (using Code::Blocks with SFML) to work on computers at Uni, which currently don't have SFML installed. Is there a way of taking everything I have in the project directory and make it like an application that can be run without needing the SFML part?

If it helps I am have created three files within the project on top of the SFML files etc.

Kind Regards

Melissa
Title: Exporting an SFML Project in Code::Blocks
Post by: Tex Killer on February 03, 2012, 12:49:37 am
Do you need just to run your program there, or do you need to compile it there as well?
Title: Exporting an SFML Project in Code::Blocks
Post by: melissa_goddard on February 03, 2012, 01:03:02 am
All I need it to do is to display the command line and a render window for the game to play on, if that's what you mean. I wouldn't require to touch the code at all whilst I'm at uni, except to view a text file that it saves the data to each time it is played, but even then only to read not edit.

If it helps I am using SFML 1.6
Title: Exporting an SFML Project in Code::Blocks
Post by: Tex Killer on February 03, 2012, 02:33:39 am
Then you must just carry the .exe file and the dependencies needed (.dll files, image files, etc).
Title: Exporting an SFML Project in Code::Blocks
Post by: mateandmetal on February 03, 2012, 07:27:33 am
You can use the static version of the library, too  :D
Title: Exporting an SFML Project in Code::Blocks
Post by: melissa_goddard on February 03, 2012, 11:01:43 am
I thought that was how it was supposed to work, I began doubting myself with the errors that would appear on screen...

//First error before adding the file to the directory
"The program can't start because libgcc_s_dw2-1.dll is missing"

//Add the file to the bin>Debug folder
"The program can't start because libstdc++-6.dll is missing"

//After adding the file different error shows
"The procedure entry point _ZTVN10_cxxabiv117_class_type_infoE could not be located in the dynamic link library libstdc++-6.dll"

What am I missing?
Title: Exporting an SFML Project in Code::Blocks
Post by: Tex Killer on February 03, 2012, 09:30:50 pm
The error suggests you are using the different dll version. Try using the same dll's that came with SFML.
Title: Exporting an SFML Project in Code::Blocks
Post by: binary1248 on February 04, 2012, 02:34:16 am
Quote from: "melissa_goddard"
I thought that was how it was supposed to work, I began doubting myself with the errors that would appear on screen...

//First error before adding the file to the directory
"The program can't start because libgcc_s_dw2-1.dll is missing"

//Add the file to the bin>Debug folder
"The program can't start because libstdc++-6.dll is missing"

//After adding the file different error shows
"The procedure entry point _ZTVN10_cxxabiv117_class_type_infoE could not be located in the dynamic link library libstdc++-6.dll"

What am I missing?


I take it you are missing the C++ runtime libraries that GCC links against. Unlike MSVC, GCC uses runtimes that aren't supplied with Windows (obviously). You can however try to compile and link with -static-libgcc and/or -static-libstdc++ see here (http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) and see if that helps.
Title: Exporting an SFML Project in Code::Blocks
Post by: StormWingDelta on February 04, 2012, 05:07:16 pm
I figured out what might be wrong.

If you don't use the full file name of the file you are linking it will give you that error.

Remember to drop the [] since they aren't part of the name.
Change out the -s and -d depending on if you want Static Debug, Dynamic Debug, Static Release, Dynamic Release.
libsfml-graphics[-s][-d].a
libsfml-window[-s][-d].a
libsfml-audio[-s][-d].a
libsfml-network[-s][-d].a
libsfml-system[-s][-d].a
Title: Exporting an SFML Project in Code::Blocks
Post by: melissa_goddard on February 08, 2012, 02:54:16 pm
That's great thanks very much!