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

Author Topic: Error compiling SPARK with SFML.  (Read 1314 times)

0 Members and 1 Guest are viewing this topic.

jjay

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error compiling SPARK with SFML.
« on: December 23, 2010, 09:29:15 pm »
Hello. I'm trying to build SPARK with SFML and got error. SPARK, SPARK_GL module and SFML2 builds fine.

Code: [Select]


self@jjay:~/dev/sparksrc/sparkengine/trunk/src$ g++ SPK_SFML_All.cpp -I../include
In file included from /usr/local/include/SFML/Window/Window.hpp:35,
                 from /usr/local/include/SFML/Window.hpp:38,
                 from ../include/RenderingAPIs/SFML/SPK_SFML_DEF.h:46,
                 from ../include/RenderingAPIs/SFML/SPK_SFML_GLOBAL.h:26,
                 from RenderingAPIs/SFML/SPK_SFMLSystem.cpp:22,
                 from SPK_SFML_All.cpp:37:
/usr/local/include/SFML/Window/WindowStyle.hpp:40: error: expected identifier before numeric constant
/usr/local/include/SFML/Window/WindowStyle.hpp:40: error: expected ‘}’ before numeric constant
/usr/local/include/SFML/Window/WindowStyle.hpp:40: error: expected unqualified-id before numeric constant
/usr/local/include/SFML/Window/WindowStyle.hpp:50: error: expected declaration before ‘}’ token


OS: Ubuntu10.10.
I'm absolutly new in c++, so sorry for possible stupid question.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error compiling SPARK with SFML.
« Reply #1 on: December 23, 2010, 09:52:19 pm »
The reason is that the Xlib.h header defines a global macro None, which conflicts with sf::Style::None.
So you must make sure that the SFML headers are included before anything that may end up including Xlib.h. Everywhere.
Laurent Gomila - SFML developer

jjay

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error compiling SPARK with SFML.
« Reply #2 on: December 23, 2010, 11:09:02 pm »
Thanks a lot!!!
Awesome speed answer! I haven't now working build copy at hand, but seems  like its exactly i need and its resolve my problem.
Will report on build pass.

 

anything