Hi,
I've just upgraded my sfml build to the latest snapshot, and I experienced a strange thing: when I tried to compile my project it throw me the following error:
/usr/bin/ld: CMakeFiles/proba2.dir/src/main.cpp.o: undefined reference to symbol 'sf::Clock::Clock()'
/usr/bin/ld: note: 'sf::Clock::Clock()' is defined in DSO /usr/local/lib/libsfml-system.so.2 so try adding it to the linker command line
/usr/local/lib/libsfml-system.so.2: could not read symbols: Invalid operation
Which is strange because linking to sfml-window used to work until now, so I tried to link sfml-system (as suggested), but the compiler went crazy and all my linkings, GLEW, freetype, freeimage etc. throw undefined reference...
set(${project_name}_external_libs Xrandr pthread sfml-window sfml-system GLEW freetype freeimage)
Is there something I forgot (or should've done)?
I installed the snapshot with:
cmake CM*
make
sudo make install
EDIT:
here's are the building errors with sfml-system:
libload_obj.so: undefined reference to `__glewBindBuffer'
libframe_buffer.so: undefined reference to `__glewCheckFramebufferStatus'
libshader_manager.so: undefined reference to `__glewGetShaderiv'
libloop.so: undefined reference to `__GLEW_VERSION_3_3'
libimage_loader.so: undefined reference to `FreeImage_GetWidth'
libfont.so: undefined reference to `FT_Set_Char_Size'
libimage_loader.so: undefined reference to `FreeImage_GetHeight'
librender_buffer.so: undefined reference to `__glewIsRenderbuffer'
librender_buffer.so: undefined reference to `__glewFramebufferRenderbuffer'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::export_m3x3_from_m4x4(mymath::m4x4)'
libimage_loader.so: undefined reference to `FreeImage_Load'
librender_buffer.so: undefined reference to `__glewBindRenderbuffer'
libload_obj.so: undefined reference to `__glewVertexAttribPointer'
libshader.so: undefined reference to `__glewUniformMatrix3fv'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::get_plane_eq(mymath::vec3f, mymath::vec3f, mymath::vec3f)'
libframe_buffer.so: undefined reference to `__glewIsFramebuffer'
libshader.so: undefined reference to `__glewUniformMatrix4fv'
libshader.so: undefined reference to `__glewUniform4fv'
libload_obj.so: undefined reference to `__glewEnableVertexAttribArray'
libshader_manager.so: undefined reference to `__glewGetUniformLocation'
libimage_loader.so: undefined reference to `FreeImage_GetBits'
libshader_manager.so: undefined reference to `__glewLinkProgram'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_rotation_m4x4(float, mymath::vec3f)'
libimage_loader.so: undefined reference to `FreeImage_ConvertTo32Bits'
librender_buffer.so: undefined reference to `__glewRenderbufferStorage'
libtexture.so: undefined reference to `__glewFramebufferTexture2D'
libload_obj.so: undefined reference to `__glewGenVertexArrays'
libloop.so: undefined reference to `glewInit'
libshader_manager.so: undefined reference to `__glewGetProgramInfoLog'
libloop.so: undefined reference to `event::get_resize()'
libshader_manager.so: undefined reference to `__glewCompileShader'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::cross_prod(mymath::vec3f, mymath::vec3f)'
libmesh.so: undefined reference to `__glewDrawRangeElements'
libloop.so: undefined reference to `glewGetErrorString'
libfont.so: undefined reference to `FT_Init_FreeType'
libloop.so: undefined reference to `FreeImage_GetVersion'
libshader_manager.so: undefined reference to `__glewCreateShader'
libshader_manager.so: undefined reference to `__glewCreateProgram'
librender_buffer.so: undefined reference to `__glewGenRenderbuffers'
libloop.so: undefined reference to `glewGetString'
libshader.so: undefined reference to `__glewUniform1i'
libshader_manager.so: undefined reference to `__glewShaderSource'
libmip_map_creator.so: undefined reference to `__glewTexImage3D'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_translation_m4x4(mymath::vec3f)'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_rotation_m3x3(float, mymath::vec3f)'
libload_obj.so: undefined reference to `__glewGetAttribLocation'
libloop.so: undefined reference to `FreeImage_Initialise'
libshader_manager.so: undefined reference to `__glewGetShaderInfoLog'
libload_obj.so: undefined reference to `__glewBindVertexArray'
libfont.so: undefined reference to `FT_New_Face'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_ortographic_m4x4(float, float, float, float, float, float)'
libload_obj.so: undefined reference to `__glewGenBuffers'
libshader_manager.so: undefined reference to `__glewGetProgramiv'
libfont.so: undefined reference to `FT_Load_Char'
/home/yours3lf/Documents/proba2/mymath/lib/libmatrix_stack.so: undefined reference to `mymath::mymath_main::create_scale_m4x4(mymath::vec3f)'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::rotate_vec3f(mymath::vec3f, mymath::m3x3)'
libimage_loader.so: undefined reference to `FreeImage_GetFileType'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::normalize_vec3f(mymath::vec3f)'
libshader_manager.so: undefined reference to `__glewBindAttribLocation'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::transform_vec4f(mymath::vec4f, mymath::m4x4)'
libload_obj.so: undefined reference to `__glewBufferData'
libshader.so: undefined reference to `__glewUseProgram'
libframe_buffer.so: undefined reference to `__glewDrawBuffers'
libshader_manager.so: undefined reference to `__glewAttachShader'
libloop.so: undefined reference to `event::handle_event()'
libframe_buffer.so: undefined reference to `__glewGenFramebuffers'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::deg_to_rad(float)'
libshader_manager.so: undefined reference to `__glewValidateProgram'
libframe_buffer.so: undefined reference to `__glewBindFramebuffer'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::operator*(mymath::m3x3 const&, mymath::vec3f const&)'
EDIT2:
I've uploaded a small program to demonstrate this. However in this the compiler doesn't go crazy when I add sfml-system, but it can only find GLEW if I install it from the software center, if I install GLEW manually it can't find it... (and it only complains about it in runtime...)
here's the link:
http://www.2shared.com/file/BzOPYhu8/sfml-testtar.htmlEDIT3:
Here's another program, but now the compiler does go crazy... This used to work before...
link:
http://www.2shared.com/file/zR0pVQTR/proba3tar.htmlBest regards,
Yours3lf