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

Author Topic: Exporting an SFML Project in Code::Blocks  (Read 5108 times)

0 Members and 1 Guest are viewing this topic.

melissa_goddard

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://melissagoddard.deviantart.com
Exporting an SFML Project in Code::Blocks
« 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
Kind Regards

Melissa

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Exporting an SFML Project in Code::Blocks
« Reply #1 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?

melissa_goddard

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://melissagoddard.deviantart.com
Exporting an SFML Project in Code::Blocks
« Reply #2 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
Kind Regards

Melissa

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Exporting an SFML Project in Code::Blocks
« Reply #3 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).

mateandmetal

  • Full Member
  • ***
  • Posts: 171
  • The bird is the word
    • View Profile
    • my blog
Exporting an SFML Project in Code::Blocks
« Reply #4 on: February 03, 2012, 07:27:33 am »
You can use the static version of the library, too  :D
- Mate (beverage) addict
- Heavy metal addict _lml
- SFML 2 addict
- My first (and free) game: BichingISH!

melissa_goddard

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://melissagoddard.deviantart.com
Exporting an SFML Project in Code::Blocks
« Reply #5 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?
Kind Regards

Melissa

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Exporting an SFML Project in Code::Blocks
« Reply #6 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.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Exporting an SFML Project in Code::Blocks
« Reply #7 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 and see if that helps.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Exporting an SFML Project in Code::Blocks
« Reply #8 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
I have many ideas but need the help of others to find way to make use of them.

melissa_goddard

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://melissagoddard.deviantart.com
Exporting an SFML Project in Code::Blocks
« Reply #9 on: February 08, 2012, 02:54:16 pm »
That's great thanks very much!
Kind Regards

Melissa