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

Author Topic: Trouble setting up SFML in Code::Blocks  (Read 1824 times)

0 Members and 1 Guest are viewing this topic.

luthwyhn

  • Newbie
  • *
  • Posts: 4
    • View Profile
Trouble setting up SFML in Code::Blocks
« on: April 22, 2011, 02:20:51 am »
I've searched the forums and found a couple references to this problem in other settings, but none of the posted solutions seem to work for me, so I'll ask again and hope someone can help me out:

I've just downloaded and installed SFML, followed the directions for setting it up in the tutorial, and am not trying to run the sample program.  When I attempt to compile, I get the following error:

C:\SFML-1.6\include\SFML\Config.hpp|122|error: climits: No such file or directory|

I've double checked that climits is indeed present on my system, and even gone so far as reinstalling codeblocks from scratch, but so far I've has no luck.  Can anyone shed some light on this for me?

Thanks

luthwyhn

  • Newbie
  • *
  • Posts: 4
    • View Profile
Trouble setting up SFML in Code::Blocks
« Reply #1 on: April 22, 2011, 02:55:24 am »
Aaaaaaaand I figured it out.  As expected it was something dumb:

my test program's file extension was .c, not .cpp.  Changed that and it worked fine.  It's really a completely illogical error message, though.  *Sigh*

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Trouble setting up SFML in Code::Blocks
« Reply #2 on: April 22, 2011, 09:04:56 am »
Quote
It's really a completely illogical error message, though. *Sigh*

Well, <climits> is a C++ header, thus the C compiler cannot find it. And it's the first error that the compiler encounters, so it doesn't have any chance to go further and possibly output more meaningful errors ;)
Laurent Gomila - SFML developer