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

Author Topic: SFML2 build problems  (Read 4425 times)

0 Members and 1 Guest are viewing this topic.

Hohoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
SFML2 build problems
« on: April 20, 2010, 04:11:48 pm »
I downloaded the latest SVN snapshot and tried to build it. However, all I get is loads of errors.

I'm especially interested in CSFML (I'm going to write bindings for Vala). This is what I get when I compile it:
Quote
cd ./build/make && make csfml
make[1]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
mkdir -p ../../lib
make -f Makefile.system
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
g++ -shared -Wl,-soname,libcsfml-system.so.2.0 -o ../../lib/libcsfml-system.so.2.0 ../../src/SFML/System/Clock.o ../../src/SFML/System/Mutex.o ../../src/SFML/System/Randomizer.o ../../src/SFML/System/Sleep.o ../../src/SFML/System/Thread.o -lsfml-system
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
mkdir -p ../../lib
make -f Makefile.window
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
g++ -o ../../src/SFML/Window/VideoMode.o -c ../../src/SFML/Window/VideoMode.cpp -W -Wall -pedantic -Wno-unused -DCSFML_EXPORTS -g -O2 -DNDEBUG -I../../include -I../../src -fPIC
../../src/SFML/Window/VideoMode.cpp: In function ‘const sfVideoMode* sfVideoMode_GetFullscreenModes(size_t*)’:
../../src/SFML/Window/VideoMode.cpp:54: error: expected initializer before ‘<’ token
../../src/SFML/Window/VideoMode.cpp:57: error: ‘modes’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:59: error: expected initializer before ‘<’ token
../../src/SFML/Window/VideoMode.cpp:60: error: ‘vector’ is not a member of ‘std’
../../src/SFML/Window/VideoMode.cpp:60: error: expected primary-expression before ‘>’ token
../../src/SFML/Window/VideoMode.cpp:60: error: ‘::const_iterator’ has not been declared
../../src/SFML/Window/VideoMode.cpp:60: error: expected ‘;’ before ‘it’
../../src/SFML/Window/VideoMode.cpp:60: error: ‘it’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:60: error: ‘SFMLModes’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:71: error: ‘modes’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:73: error: ‘modes’ was not declared in this scope
make[2]: *** [../../src/SFML/Window/VideoMode.o] Virhe 1
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
make[1]: *** [window] Virhe 2
make[1]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
make: *** [csfml] Virhe 2


If I try to build the "regular" SFML, I get this:
Quote
cd ./build/make && make sfml
make[1]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
mkdir -p ../../lib
make -f Makefile.system
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
g++ -shared -Wl,-soname,libsfml-system.so.2.0 -o ../../lib/libsfml-system.so.2.0 ../../src/SFML/System/Clock.o ../../src/SFML/System/Err.o ../../src/SFML/System/Lock.o ../../src/SFML/System/Mutex.o ../../src/SFML/System/Randomizer.o ../../src/SFML/System/Sleep.o ../../src/SFML/System/String.o ../../src/SFML/System/Thread.o ../../src/SFML/System/ThreadLocal.o ../../src/SFML/System/Utf.o ../../src/SFML/System/Unix/Initializer.o ../../src/SFML/System/Unix/MutexImpl.o ../../src/SFML/System/Unix/Platform.o ../../src/SFML/System/Unix/ThreadImpl.o ../../src/SFML/System/Unix/ThreadLocalImpl.o -lpthread
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
mkdir -p ../../lib
make -f Makefile.window
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
g++ -shared -Wl,-soname,libsfml-window.so.2.0 -o ../../lib/libsfml-window.so.2.0 ../../src/SFML/Window/Context.o ../../src/SFML/Window/GlContext.o ../../src/SFML/Window/Input.o ../../src/SFML/Window/VideoMode.o ../../src/SFML/Window/Window.o ../../src/SFML/Window/WindowImpl.o ../../src/SFML/Window/Linux/GlxContext.o ../../src/SFML/Window/Linux/Joystick.o ../../src/SFML/Window/Linux/VideoModeImpl.o ../../src/SFML/Window/Linux/WindowImplX11.o -lX11 -lXrandr -lGL
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
mkdir -p ../../lib
make -f Makefile.graphics
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
g++ -o ../../src/SFML/Graphics/GLCheck.o -c ../../src/SFML/Graphics/GLCheck.cpp -W -Wall -pedantic -g -O2 -DNDEBUG -I../../include -I../../src -fPIC -I/usr/include/freetype2
In file included from ../../src/SFML/Graphics/GLCheck.cpp:28:
../../src/SFML/Graphics/GLCheck.hpp:32:21: error: GL/glew.h: Tiedostoa tai hakemistoa ei ole
../../src/SFML/Graphics/GLCheck.cpp: In function ‘void sf::priv::GLCheckError(const std::string&, unsigned int)’:
../../src/SFML/Graphics/GLCheck.cpp:42: error: ‘GLenum’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:42: error: expected ‘;’ before ‘errorCode’
../../src/SFML/Graphics/GLCheck.cpp:44: error: ‘errorCode’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:44: error: ‘GL_NO_ERROR’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:52: error: ‘GL_INVALID_ENUM’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:59: error: ‘GL_INVALID_VALUE’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:66: error: ‘GL_INVALID_OPERATION’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:73: error: ‘GL_STACK_OVERFLOW’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:80: error: ‘GL_STACK_UNDERFLOW’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:87: error: ‘GL_OUT_OF_MEMORY’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:94: error: ‘GL_INVALID_FRAMEBUFFER_OPERATION_EXT’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp: In function ‘void sf::priv::EnsureGlewInit()’:
../../src/SFML/Graphics/GLCheck.cpp:119: error: ‘glewInit’ was not declared in this scope
make[2]: *** [../../src/SFML/Graphics/GLCheck.o] Virhe 1
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
make[1]: *** [graphics] Virhe 2
make[1]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
make: *** [sfml] Virhe 2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 build problems
« Reply #1 on: April 20, 2010, 04:47:25 pm »
Hi

To compile SFML 2, you need to install the development files for GLEW.

To compile CSFML 2, ou need to install SFML 2 ;)
Laurent Gomila - SFML developer

Hohoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
SFML2 build problems
« Reply #2 on: April 20, 2010, 05:05:42 pm »
Quote from: "Laurent"
Hi

To compile SFML 2, you need to install the development files for GLEW.

To compile CSFML 2, ou need to install SFML 2 ;)

Thank you! The errors produced by GCC tend to be too uninformative. Or then it's just me.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 build problems
« Reply #3 on: April 20, 2010, 05:10:39 pm »
I totally agree for this one
Quote
error: GL/glew.h: Tiedostoa tai hakemistoa ei ole

:lol:

Seriously, for the CSFML error, the problem is that you already had a previous of SFML installed, but without an #include <vector> statement in Window.hpp (this one was added recently); that's why gcc can't identify what's before the '<' token (which is 'std::vector').
Laurent Gomila - SFML developer

Hohoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
SFML2 build problems
« Reply #4 on: April 20, 2010, 05:16:40 pm »
Quote from: "Laurent"
I totally agree for this one
Quote
error: GL/glew.h: Tiedostoa tai hakemistoa ei ole

:lol:

...

I seriously didn't see that one.

sebbu

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML2 build problems
« Reply #5 on: April 21, 2010, 03:15:19 pm »
GCC can print messages in various language.
this error is in finnish, probably because of locale / LC_ALL / LANG or corrupt/incorrect lc_message file (the ones with .mo extension)

I already got that kind of error, but i upgraded gcc soon after it.

Hohoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
SFML2 build problems
« Reply #6 on: April 21, 2010, 07:24:05 pm »
Quote from: "sebbu"
GCC can print messages in various language.
this error is in finnish, probably because of locale / LC_ALL / LANG or corrupt/incorrect lc_message file (the ones with .mo extension)

I already got that kind of error, but i upgraded gcc soon after it.

I'm Finnish, so it's not a problem for me. I just think GCC's errors are a big wall of text.