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

Author Topic: sfml-system.dll  (Read 3493 times)

0 Members and 1 Guest are viewing this topic.

NicholasArdens

  • Newbie
  • *
  • Posts: 6
    • View Profile
sfml-system.dll
« on: August 08, 2011, 05:01:03 am »
Okay, I'm trying to compile the simplest program the tutorial offers.

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}


I'm trying to get it so I can send someone the .exe of the build and they can run it without me having to send the 5 Megabyte system.dll along with the 400kb .exe

I've gone through the tutorial for the static libraries but it seems to snag every time I try and compile it.

Is there a way to have SFML compile without having the .dll files in my Windows/system folder?

Any suggestions appreciated.

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
sfml-system.dll
« Reply #1 on: August 08, 2011, 05:37:41 am »
What exactly is happening when the static compilation snags?
I use the latest build of SFML2

NicholasArdens

  • Newbie
  • *
  • Posts: 6
    • View Profile
sfml-system.dll
« Reply #2 on: August 08, 2011, 05:48:12 am »
Well, I'm following the tutorial, where it tells you to run the batch.bat. It tells me 'xcopy' is not recognized as an internal or external command, operable program or batch file.
The process cannot access the file because it is being used by another process.

Edit: Actually before that a load of errors state
"'codeblocks' is not recognized as an internal or external command, operable program or batch file."

Edit Edit:
And when I use the linker option -lsfml-system-s for the static library I get errors like
"undefined reference to `_Unwind_Resume'|"

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sfml-system.dll
« Reply #3 on: August 08, 2011, 07:59:23 am »
Quote
Well, I'm following the tutorial, where it tells you to run the batch.bat

This is only for compiling SFML, you don't need to do it.

Quote
And when I use the linker option -lsfml-system-s for the static library I get errors like
"undefined reference to `_Unwind_Resume'|"

Probably an incompatibility with your version of MinGW. Which one do you have? You can try with the one which is provided at the beginning of the tutorial.
Laurent Gomila - SFML developer

NicholasArdens

  • Newbie
  • *
  • Posts: 6
    • View Profile
sfml-system.dll
« Reply #4 on: August 08, 2011, 08:49:08 am »
I believe I have the 4.4.1 that came with uhh Code::Blocks

Edit:Unless that was the GCC that came with the MinGW? In which case, I do not know.

NicholasArdens

  • Newbie
  • *
  • Posts: 6
    • View Profile
sfml-system.dll
« Reply #5 on: August 09, 2011, 03:29:37 am »
Your suggestion to use the MinGW on the Tutorial page worked, thanks a bunch!