I'm having some difficulty getting SFML 2.1 to work. I had already used 2.0 before and decided to upgrade.
I downloaded and installed the newest version of Code::Blocks (12.11), and then downloaded the SFML source and compiled using CMake and makefiles (asking for static libraries).
The example programs run, and I can compile them using make, the problem comes when I try to make a new project in Code::Blocks.
Following the tutorial I started a blank project, copy/pasted in the tutorial code into a main.cpp file, then changed the build options for both compile targets. I picked out both the search directories, and added the libraries to the linker in the right order. When I go to compile however I get the following errors concerning Shader.cpp and libGlew
||=== FukIt, Steamcrawlers ===|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::bind(sf::Shader const*)':|
Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
Shader.cpp|| undefined reference to `__glewUniform1iARB'|
Shader.cpp|| undefined reference to `__glewActiveTextureARB'|
Shader.cpp|| undefined reference to `__glewActiveTextureARB'|
Shader.cpp|| undefined reference to `__glewUniform1iARB'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::isAvailable()':|
Shader.cpp|| undefined reference to `__GLEW_ARB_shading_language_100'|
Shader.cpp|| undefined reference to `__GLEW_ARB_shader_objects'|
Shader.cpp|| undefined reference to `__GLEW_ARB_vertex_shader'|
Shader.cpp|| undefined reference to `__GLEW_ARB_fragment_shader'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::bindTextures() const':|
Shader.cpp|| undefined reference to `__glewUniform1iARB'|
Shader.cpp|| undefined reference to `__glewActiveTextureARB'|
Shader.cpp|| undefined reference to `__glewActiveTextureARB'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::compile(char const*, char const*)':|
Shader.cpp|| undefined reference to `__GLEW_ARB_shading_language_100'|
Shader.cpp|| undefined reference to `__GLEW_ARB_shader_objects'|
Shader.cpp|| undefined reference to `__GLEW_ARB_vertex_shader'|
Shader.cpp|| undefined reference to `__GLEW_ARB_fragment_shader'|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
Shader.cpp|| undefined reference to `__glewCreateProgramObjectARB'|
Shader.cpp|| undefined reference to `__glewCreateShaderObjectARB'|
Shader.cpp|| undefined reference to `__glewShaderSourceARB'|
Shader.cpp|| undefined reference to `__glewCompileShaderARB'|
Shader.cpp|| undefined reference to `__glewGetObjectParameterivARB'|
Shader.cpp|| undefined reference to `__glewAttachObjectARB'|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
Shader.cpp|| undefined reference to `__glewCreateShaderObjectARB'|
Shader.cpp|| undefined reference to `__glewShaderSourceARB'|
Shader.cpp|| undefined reference to `__glewCompileShaderARB'|
Shader.cpp|| undefined reference to `__glewGetObjectParameterivARB'|
Shader.cpp|| undefined reference to `__glewAttachObjectARB'|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
Shader.cpp|| undefined reference to `__glewLinkProgramARB'|
Shader.cpp|| undefined reference to `__glewGetObjectParameterivARB'|
Shader.cpp|| undefined reference to `glFlush'|
Shader.cpp|| undefined reference to `__glewGetInfoLogARB'|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
Shader.cpp|| undefined reference to `__glewGetInfoLogARB'|
Shader.cpp|| undefined reference to `__glewGetInfoLogARB'|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::~Shader()':|
Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::getParamLocation(std::string const&)':|
Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::setParameter(std::string const&, sf::Transform const&)':|
Shader.cpp|| undefined reference to `__glewGetHandleARB'|
Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
Shader.cpp|| undefined reference to `__glewUniformMatrix4fvARB'|
Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
/home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a(Shader.cpp.o)||In function `sf::Shader::setParameter(std::string const&, float, float, float, float)':|
Shader.cpp|| undefined reference to `__glewGetHandleARB'|
Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
Shader.cpp|| undefined reference to `__glewUniform4fARB'|
Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings (0 minutes, 7 seconds) ===|
Here is my compile line from Code::Blocks
g++ -Wall -DSFML_STATIC -O2 -I/home/codyethanjordan/Desktop/Design/SFML-master/include -c /home/codyethanjordan/Desktop/Design/FukIt/main.cpp -o obj/Release/main.o
g++ -L/home/codyethanjordan/Desktop/Design/SFML-master/lib -o bin/Release/FukIt obj/Release/main.o -s /home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-graphics-s.a /home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-window-s.a /home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-system-s.a /home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-audio-s.a /home/codyethanjordan/Desktop/Design/SFML-master/lib/libsfml-network-s.a
I'm using g++ on Fedora linux.
Thanks for reading.