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

Author Topic: SFML 1.6 with Codeblocks 10.05 Linking error  (Read 3946 times)

0 Members and 1 Guest are viewing this topic.

AlGaN

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML 1.6 with Codeblocks 10.05 Linking error
« on: December 05, 2010, 06:05:24 pm »
Hello,

being a newbie with SFML I tried to integrate SFML 1.6 in Codeblocks 10.05 but get linker error, when compiling the template of Codeblocks for SFML.

Using precompiled SFML 1.6 SDK under Windows Vista (installed in D:\SFML-1.6) and copying MinGW gcc 4.4 packages over my standard MinGW installation (installed in D:\MinGW) I try to set Codeblocks global variable for SFML  "sfml' to:

Quote

base: D:\SFML-1.6
include: D:\SFML-1.6\include
lib: D:\SFML-1.6\lib


then when I start a project using SFML template and state global variable
Quote
(#sfml)
I get an error:

Quote

The path you entered seems valid, but this wizard can't locate the following SFML's include file: Audio.hpp in it.


Can't I use the Codeblocks template project to start a SFML project?

Any help appreciated. Thanks.

Edit: Okay I could get this working if I set the global variable include path to:

Quote

include: D:\SFML-1.6\include


then the template generator works, but if I compile it could not find header files so I had to reset include path to:

Quote

include: D:\SFML-1.6\include


but then I get a linker error:
Quote

ld.exe||cannot find -lsfml-audio.dll|
||=== Build finished: 1 errors, 0 warnings ===|


I don't know very much about link libraries under GNU C, but I remembered that the link library name is something like
liblibrary.a or so, so why does it want to link against a DLL file. In my understanding DLL is for runtime.

Further the file sfml-audio.dll exists in the lib directory together with libsfml-audio.a so I don't understand why the linker doesn't find it?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 with Codeblocks 10.05 Linking error
« Reply #1 on: December 05, 2010, 08:35:40 pm »
Don't use this template, it's totally broken. Use the SFML "getting started" tutorial to setup your project.
Laurent Gomila - SFML developer

AlGaN

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML 1.6 with Codeblocks 10.05 Linking error
« Reply #2 on: December 06, 2010, 02:39:05 pm »
Hello,

okay, got the first tutorial code working with setting global include and lib directories. Is there any way to localize these settings (ie not to set SFML include/lib directories in global compiler settings). In my understanding this is the meaning of Codeblock's global variables.

Anyways, thanks for the help (though I hope the CB template is working again soon)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 with Codeblocks 10.05 Linking error
« Reply #3 on: December 06, 2010, 02:48:10 pm »
Quote
Is there any way to localize these settings (ie not to set SFML include/lib directories in global compiler settings).

There are also include/library search paths in the project settings.
Laurent Gomila - SFML developer

 

anything