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

Author Topic: Compile Errors upon installation (SFML 2)  (Read 2273 times)

0 Members and 1 Guest are viewing this topic.

HKei

  • Newbie
  • *
  • Posts: 23
    • View Profile
Compile Errors upon installation (SFML 2)
« on: January 31, 2012, 06:13:48 pm »
Moved this from General Discussions because apparently this is where installation questions are supposed to be asked.


Today I got a copy of the source code with git

Code: [Select]
git clone git://github.com/ https://github.com/LaurentGomila/SFML

And just got a makefile with CMake using the default options (except that I also told it to compile the examples).

Got the following errors upon invoking make:

Code: [Select]
/home/hannes/SFML/SFML/src/SFML/Window/Linux/JoystickImpl.cpp: In member function 'void sf::priv::JoystickImpl::Close()':
/home/hannes/SFML/SFML/src/SFML/Window/Linux/JoystickImpl.cpp:79:17: error: 'close' was not declared in this scope
/home/hannes/SFML/SFML/src/SFML/Window/Linux/JoystickImpl.cpp: In member function 'sf::priv::JoystickState sf::priv::JoystickImpl::Update()':
/home/hannes/SFML/SFML/src/SFML/Window/Linux/JoystickImpl.cpp:125:52: error: 'read' was not declared in this scope
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/Linux/JoystickImpl.cpp.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2


I am using Ubuntu 11.10, and I kinda feel like an idiot right now because noone else seems to have this problem.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Compile Errors upon installation (SFML 2)
« Reply #1 on: January 31, 2012, 06:18:20 pm »
Hmm... That's strange indeed.

Is it better with <stdio.h> or <unistd.h> included in JoystickImpl.cpp?
Laurent Gomila - SFML developer

HKei

  • Newbie
  • *
  • Posts: 23
    • View Profile
Compile Errors upon installation (SFML 2)
« Reply #2 on: January 31, 2012, 06:34:15 pm »
<cstdio> (or should it really have been <stdio.h>?) didn't help, but <unistd.h> did the trick. Thank you very much.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Compile Errors upon installation (SFML 2)
« Reply #3 on: January 31, 2012, 07:05:38 pm »
I pushed the fix, thanks for your help :)
Laurent Gomila - SFML developer

 

anything