SFML community forums
Help => General => Topic started by: jjay 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.
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.
-
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.
-
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.