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

Author Topic: [ubuntu] issues linking sfml with codeblocks  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

codewizard

  • Newbie
  • *
  • Posts: 9
    • View Profile
[ubuntu] issues linking sfml with codeblocks
« on: July 21, 2013, 02:23:19 am »
So I want to develop on my Ubuntu machine using codeblocks. I downloaded the archive from the homepage and extracted it. Then I followed the [url http://www.sfml-dev.org/tutorials/2.0/start-cb.php]tutorial[/url] to configure codeblocks.
Now I have the problem, when compiling in debug mode, that codeblocks doesn't find the libsfml-*-d files, but has no problems finding the libsfml-* files (in release mode).
In release mode on the other side there seems to be a problem with GLEW because I get these error messages:
||warning: libGLEW.so.1.5, needed by ../sfml2/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)|
obj/Debug/main.o||In function `main':|
/home/manuel/Development/SFML game development/main.cpp|5|undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned int, sf::ContextSettings const&)'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUniform1fARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_ARB_shader_objects'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewGetObjectParameterivARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_ARB_vertex_shader'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewFramebufferTexture2DEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUniformMatrix4fvARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewGenFramebuffersEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUniform3fARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewRenderbufferStorageEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_ARB_fragment_shader'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewActiveTextureARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewShaderSourceARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `glewInit'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewBindFramebufferEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewFramebufferRenderbufferEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewLinkProgramARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUseProgramObjectARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewBlendFuncSeparateEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewGenRenderbuffersEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUniform2fARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUniform4fARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewCreateProgramObjectARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `glewGetErrorString'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewCompileShaderARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewDeleteRenderbuffersEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewDeleteObjectARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewGetUniformLocationARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewGetInfoLogARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_EXT_blend_func_separate'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewDeleteFramebuffersEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewCheckFramebufferStatusEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewUniform1iARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_ARB_texture_non_power_of_two'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_ARB_shading_language_100'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewCreateShaderObjectARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewBindRenderbufferEXT'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__GLEW_EXT_framebuffer_object'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewAttachObjectARB'|
../sfml2/lib/libsfml-graphics.so||undefined reference to `__glewGetHandleARB'|
||=== Build finished: 40 errors, 1 warnings (0 minutes, 0 seconds) ===|
 
I double checked I have libGLEW installed (normal and *-dev as well) but in the version 1.8 (standard in ubuntu repos).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
AW: [ubuntu] issues linking sfml with codeblocks
« Reply #1 on: July 21, 2013, 07:35:18 am »
You need to check your path for debug mode.

SFML was built with GLEW 1.5, so you either get the old version, or even better build SFML yourself. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

codewizard

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: [ubuntu] issues linking sfml with codeblocks
« Reply #2 on: July 21, 2013, 11:53:33 am »
Okay, I am gonny try and build it myself. But the path should be correct. Isn't it (when the extracted archive is in home directory) /home/user/sfml2/lib?