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

Author Topic: Problematic SFML/CodeBlocks on Windows  (Read 2360 times)

0 Members and 4 Guests are viewing this topic.

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Problematic SFML/CodeBlocks on Windows
« on: May 30, 2013, 01:25:23 pm »
Hi,

Just signed up to the forums because I'm having problems getting SFML in CB under Windows to work properly, even compiling, building and running the example code (under the SFML 2.0 initial tutorial) is not working. I've attached what it's throwing back.

I've tried using all three of the libraries (SJLJ 32, SJLJ 64 and DW2) and none of them make a difference, so it appears as though it's something I'm failing at. I've properly pointed CB build options to the correct places (include/lib under SFML project > Search Directories > Compiler/Linker) and specified the Link libraries (Release > Linker settings > Link libraries > sfml-graphics/window/system) and tried defining the project as static under Compiler settings, but it's still throwing me back.

I must be doing something stupid or overlooking a small detail. Anyone have any ideas? Thanks.

[attachment deleted by admin]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problematic SFML/CodeBlocks on Windows
« Reply #1 on: May 30, 2013, 02:16:01 pm »
It seems like you link to static libraries (sfml-xxx-s) but didn't define SFML_STATIC.
Laurent Gomila - SFML developer

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #2 on: May 30, 2013, 02:29:04 pm »
SFML_STATIC under #defines under Compiler settings under root project.
No change, I'm afraid.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problematic SFML/CodeBlocks on Windows
« Reply #3 on: May 30, 2013, 02:51:22 pm »
Upload your project file, it will be faster than asking tons of questions about how you configured your project ;)
Laurent Gomila - SFML developer

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #4 on: May 30, 2013, 03:29:41 pm »
Probably for the best. Here:
http://db.tt/uwLlGTQL

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #5 on: May 30, 2013, 03:37:33 pm »
Well Dropbox is giving me 503, so have another link:

https://mega.co.nz/#!YE5AjRBZ!DNE5HiiTtcv7FFbUGCnzPRCEfClk5cDy70FwbxINaeo

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problematic SFML/CodeBlocks on Windows
« Reply #6 on: May 30, 2013, 03:42:37 pm »
Your project is empty, there's no reference to any SFML path or library.
Laurent Gomila - SFML developer

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problematic SFML/CodeBlocks on Windows
« Reply #8 on: May 30, 2013, 04:21:00 pm »
You only link to SFML libs in your Release configuration, the Debug one links to nothing. And you define the SFML_STATIC flag but link to the dynamic libraries.

Please read the tutorial carefully and don't mix everything.
Laurent Gomila - SFML developer

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #9 on: May 30, 2013, 05:54:16 pm »
I haven't done anything with the Debug, I've used the Link libraries under Release.

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #10 on: May 30, 2013, 06:14:55 pm »
Ok, all the Linker settings under the project (Debug and Release) point to sfml-graphics/window/system. Search directories point to include/lib in compiler/linker under Debug and Release. SFML_STATIC or otherwise, still I'm getting the same error. What else am I doing wrong?

https://mega.co.nz/#!NR5DhTyB!ZOTDu01OXGBbAoeb0GffpQ4fVkB3T4QcSmCEoYdu6tA

I'm banging my head against a brick wall.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problematic SFML/CodeBlocks on Windows
« Reply #11 on: May 30, 2013, 07:09:49 pm »
You're still doing everything wrong. Why don't you just follow the tutorial quietly and step by step? What is described there is not what you have in your project, there are still several mistakes.

I have the feeling that you're frustrated and try to "fix" your project by adding/removing random stuff, instead or following what is said in the tutorial (come on, there are even screenshots of every step). Restart from scratch if it helps ;)

PS: you can paste the contents of your .cbp file directly in your posts instead of uploading your whole project, it's just a tiny XML file.
Laurent Gomila - SFML developer

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #12 on: May 30, 2013, 08:40:16 pm »
Gone through the tutorial once again, followed the steps, copied the DLLs over, almost done. Now I'm hit with this problem. Any advice?

[attachment deleted by admin]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problematic SFML/CodeBlocks on Windows
« Reply #13 on: May 30, 2013, 08:49:39 pm »
Great :)

Now it seems that you downloaded the wrong package of SFML. Which one did you try this time? Can you open a console, navigate to your mingw/bin directory, type "gcc -v" and copy the output here?

And you only have one version of gcc installed, right?
Laurent Gomila - SFML developer

Shout

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problematic SFML/CodeBlocks on Windows
« Reply #14 on: May 30, 2013, 09:03:24 pm »
TDM (SJLJ) 64 bit version. This is what I get:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)


I don't know if I have more than one version of gcc installed. How would I check/get rid of the conflicting version?
This is so much simpler on Linux..

 

anything