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

Author Topic: GraphicsDevice.cpp - std::mem_fun  (Read 5170 times)

0 Members and 1 Guest are viewing this topic.

Redien

  • Newbie
  • *
  • Posts: 30
    • View Profile
GraphicsDevice.cpp - std::mem_fun
« on: March 25, 2008, 12:18:52 am »
I've been following the progress of SFML for a while now and I really like the simplicity of the interface.

I recently started using STLPort instead of the STL that comes with MinGW and ran into an error when compiling SFML 1.2 regarding std::mem_fun not being found in GraphicsDevice.cpp. I've had no troubles compiling it before so I thought it was weird and looked it up. It seems like mem_fun is supposed to be defined in the STL header 'functional'. So I included it and it compiled.

I just thought you'd like to know if you weren't aware of it already. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GraphicsDevice.cpp - std::mem_fun
« Reply #1 on: March 25, 2008, 01:54:39 am »
Thanks, I'll fix it as soon as possible :)
Laurent Gomila - SFML developer

Redien

  • Newbie
  • *
  • Posts: 30
    • View Profile
GraphicsDevice.cpp - std::mem_fun
« Reply #2 on: March 25, 2008, 11:04:04 pm »
I just wanted to add that I had no trouble compiling the SVN version I downloaded earlier today.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GraphicsDevice.cpp - std::mem_fun
« Reply #3 on: March 26, 2008, 02:32:02 am »
Really ? I didn't change anything.
Laurent Gomila - SFML developer

Redien

  • Newbie
  • *
  • Posts: 30
    • View Profile
GraphicsDevice.cpp - std::mem_fun
« Reply #4 on: March 26, 2008, 02:47:36 am »
I know, that's why I thought I should mention it. :)
But I don't know why it compiled this time, maybe you have included the header someplace else?

I can do some more test builds with the 1.2 version to see if it produces the same error, maybe it's just me who screwed up. :)

Redien

  • Newbie
  • *
  • Posts: 30
    • View Profile
GraphicsDevice.cpp - std::mem_fun
« Reply #5 on: March 26, 2008, 12:53:14 pm »
Alright, I did some more digging in the STL and I finally found it. In the SVN version you have included SFML/Window/Window.hpp which in turn includes the 'queue' STL header which in turn includes 'functional', at least in STLPort.
In 1.2 you don't include Window.hpp so functional does not get included when I compile it.

Then I don't know if 'functional' is included in other headers or why it does compile with other STL implementations.

But 'functional' should be included anyway and takes care of the problem. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
GraphicsDevice.cpp - std::mem_fun
« Reply #6 on: March 27, 2008, 01:49:55 am »
Quote
But 'functional' should be included anyway and takes care of the problem.

Yeah, of course ;)
Laurent Gomila - SFML developer