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

Author Topic: SFML 2 graphics fails to build  (Read 4134 times)

0 Members and 1 Guest are viewing this topic.

Zamadatix

  • Newbie
  • *
  • Posts: 27
    • View Profile
SFML 2 graphics fails to build
« on: August 11, 2011, 11:45:04 pm »
After making the project files for codeblocks in cmake SFML builds fine until it runs into errors at sfml graphics with the log

Code: [Select]
||=== SFML, all ===|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Set_Pixel_Sizes'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Get_Char_Index'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Get_Char_Index'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Get_Kerning'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Done_Face'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Done_FreeType'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Init_FreeType'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Open_Face'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Select_Charmap'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Init_FreeType'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_New_Memory_Face'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Select_Charmap'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Init_FreeType'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_New_Face'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Select_Charmap'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Init_FreeType'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_New_Memory_Face'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Select_Charmap'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Load_Char'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Get_Glyph'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Glyph_To_Bitmap'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Bitmap_Embolden'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Glyph_To_Bitmap'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Done_Glyph'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Outline_Embolden'|
CMakeFiles\sfml-graphics.dir\objects.a(Font.cpp.obj)Font.cpp|| undefined reference to `FT_Glyph_To_Bitmap'|
CMakeFiles\sfml-graphics.dir\objects.a(GLCheck.cpp.obj)GLCheck.cpp|| undefined reference to `glewInit'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_std_error'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_CreateCompress'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_stdio_dest'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_set_defaults'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_set_quality'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_start_compress'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_write_scanlines'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_finish_compress'|
CMakeFiles\sfml-graphics.dir\objects.a(ImageLoader.cpp.obj)ImageLoader.cpp|| undefined reference to `jpeg_destroy_compress'|
CMakeFiles\sfml-graphics.dir\objects.a(Renderer.cpp.obj)Renderer.cpp|| undefined reference to `__GLEW_EXT_blend_func_separate'|
CMakeFiles\sfml-graphics.dir\objects.a(Renderer.cpp.obj)Renderer.cpp|| undefined reference to `__glewBlendFuncSeparateEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(Renderer.cpp.obj)Renderer.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewDeleteFramebuffersEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewDeleteFramebuffersEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewDeleteFramebuffersEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewDeleteFramebuffersEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewGenFramebuffersEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewBindFramebufferEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewFramebufferTexture2DEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewCheckFramebufferStatusEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewBindFramebufferEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewGenRenderbuffersEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewBindRenderbufferEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewRenderbufferStorageEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__glewFramebufferRenderbufferEXT'|
CMakeFiles\sfml-graphics.dir\objects.a(RenderTextureImplFBO.cpp.obj)RenderTextureImplFBO.cpp|| undefined reference to `__GLEW_EXT_framebuffer_object'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetHandleARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUniform1fARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetHandleARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUniform2fARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetHandleARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUniform3fARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetHandleARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUniform4fARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__GLEW_ARB_shading_language_100'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__GLEW_ARB_shader_objects'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__GLEW_ARB_vertex_shader'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__GLEW_ARB_fragment_shader'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewCreateProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewCreateShaderObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewCreateShaderObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewShaderSourceARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewShaderSourceARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewCompileShaderARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewCompileShaderARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetObjectParameterivARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetObjectParameterivARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewAttachObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewAttachObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewLinkProgramARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetObjectParameterivARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetInfoLogARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetInfoLogARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetInfoLogARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUniform1iARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewActiveTextureARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewActiveTextureARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUseProgramObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewUniform1iARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewDeleteObjectARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Shader.cpp.obj)Shader.cpp|| undefined reference to `__glewGetUniformLocationARB'|
CMakeFiles\sfml-graphics.dir\objects.a(Texture.cpp.obj)Texture.cpp|| undefined reference to `__GLEW_ARB_texture_non_power_of_two'|
||=== Build finished: 110 errors, 0 warnings (0 minutes, 3 seconds) ===|


Any ideas as to why it's failing? I've done everything to the guide in the tutorial section.

Haikarainen

  • Guest
SFML 2 graphics fails to build
« Reply #1 on: August 11, 2011, 11:53:41 pm »
Are you trying to build static?
What target are you trying to build? Try "All" if you didn't already.

Seems to be a problem with libfreetype, make sure the project links it.

Zamadatix

  • Newbie
  • *
  • Posts: 27
    • View Profile
SFML 2 graphics fails to build
« Reply #2 on: August 12, 2011, 12:05:47 am »
I've tried static and dynamic. I've been using build all to get the error and I've tried just build sfml graphics.

How do I make sure libfreetype linked properly

Haikarainen

  • Guest
SFML 2 graphics fails to build
« Reply #3 on: August 12, 2011, 12:32:55 am »
Quote from: "Zamadatix"
I've tried static and dynamic. I've been using build all to get the error and I've tried just build sfml graphics.

How do I make sure libfreetype linked properly


I would guess adding the contents of:
SFMLDIR/extlibs/libs-mingw/*
To the list of libraries to link. The list is found by rightclick project->build options->choose tab linker settings ->the list to the left.
Make sure it goes for the target "All"(found in list to most-left).

If you run into problems, You should also add
SFMLDIR/extlibs/headers
To the "Tab search directories "-> "compiler" list.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 graphics fails to build
« Reply #4 on: August 12, 2011, 07:57:09 am »
If FreeType is not found, you should have had an error message when configuring the project with CMake.

And anyway, don't generate Code::Blocks projects. You're not the first one to report problems with it. Use a simple MinGW makefile.
Laurent Gomila - SFML developer