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

Author Topic: SFML Linking  (Read 1894 times)

0 Members and 2 Guests are viewing this topic.

kiramarshiku

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
SFML Linking
« on: October 28, 2015, 04:11:22 am »
I have been trying to get SFML linked properly and run the example code with no success for several days now. I'm using eclipse mars as my IDE and the latest MinGW 32bit version of SFML. Here's screenshots of everything, I'd be very grateful if anyone could tell me what I'm doing wrong as I'm baffled and frustrated.
Screenshots:
(click to show/hide)

GraphicsWhale

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: SFML Linking
« Reply #1 on: October 28, 2015, 04:56:29 am »
Try adding these linker options:
opengl32
openal32
freetype
jpeg
winmm
gdi32
ws2_32
flac
vorbisenc
vorbisfile
vorbis
ogg

Taken from this page: www.sfml-dev.org/tutorials/2.3/start-cb.php

DuvnjakA

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Re: SFML Linking
« Reply #2 on: October 28, 2015, 04:53:41 pm »
If you had read the tutorial, you would have seen that it explicitly states that you need to link all of the dependencies that you are using... And it gives you a list of which dependencies go with which module...

kiramarshiku

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: SFML Linking
« Reply #3 on: October 28, 2015, 06:33:32 pm »
Try adding these linker options:
opengl32
openal32
freetype
jpeg
winmm
gdi32
ws2_32
flac
vorbisenc
vorbisfile
vorbis
ogg

Taken from this page: www.sfml-dev.org/tutorials/2.3/start-cb.php

I tried that and also tried explicitly defining the paths for each file but it is still not working. Now it's saying it cannot find the files even though they are right where I told the linker they would be.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML Linking
« Reply #4 on: October 28, 2015, 07:10:40 pm »
Are you sure the MinGW is compatible with your Eclipse compiler? The compiler and its version must match exactly. "It's g++" doesn't suffice, especially not on Windows, where people have loved to create a wide variety of incompatible g++ distributions. In case of doubt, recompile SFML with the compiler that Eclipse uses.

Make sure you have the correct linking order: dependent libraries must appear before their dependencies.

When files are not found, you're doing something wrong (the library name should suffice, maybe specifying the entire path is not handled correctly because of pre-/postfixes).

Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything