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

Author Topic: Linking SFML with Eclipse on Windows  (Read 8152 times)

0 Members and 1 Guest are viewing this topic.

Wqer

  • Guest
Linking SFML with Eclipse on Windows
« on: November 19, 2013, 09:35:35 pm »
.
« Last Edit: January 20, 2014, 04:22:26 am by Wqer »

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Linking SFML with Eclipse on Windows
« Reply #1 on: November 19, 2013, 09:52:49 pm »
You're doing it wrong.

http://gaoth.org/?p=196 or google SFML+Eclipse

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #2 on: November 19, 2013, 10:50:39 pm »
Remove the lib prefix. You also might want to read up on how a compiler and linker work, it's crucial for development. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #3 on: November 20, 2013, 01:56:01 am »
Yes, but it seems like your libs are not compatible with your linker. You need to make sure that the libs fully match the use compiler, thus since you use 4.8.1 you can't use any precompiled libs from the download site, but you'll need to compile SFML on your own.

Here's a relatively nice description on what a compiler and linker does.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #4 on: January 02, 2014, 08:40:21 pm »
i didn't saw your pictures correctly
firstly, remove lib prefix
secondly, maybe the libraries are incompatible with your linker
in my idea, recompile them in order to fix this issue
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #5 on: January 03, 2014, 01:00:34 am »
Unfortunately images are bound to be deleted with time.
Not if you pay for the hosting - you can even embed the images! ;)

Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #6 on: January 03, 2014, 05:09:23 am »
I haven't worked with eclipse
but If you are using GCC, make sure the libraries don't have lib prefix and must not have .a suffix
for example, we want to link SFML-system
in your linker settings (project settings->linker in code::blocks), add this:
sfml-system-s
and compile
the linker automaticly find's libsfml-system-s.a
and in my idea, copy and paste the text
because I can't see well
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #7 on: January 05, 2014, 06:17:14 am »
I can't see the images well
but I've sed that
please copy and paste the errors here
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

Raincode

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Linking SFML with Eclipse on Windows
« Reply #8 on: January 05, 2014, 04:37:21 pm »
Try it without the .a suffix

amir ramezani

  • Jr. Member
  • **
  • Posts: 81
  • i'm a programmer who can't see well
    • View Profile
    • download useful software!
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #9 on: January 05, 2014, 05:09:20 pm »
as I've previously said, you can't plase .a at the end of the libraries while you are linking
if you can't see well, you can't test your applications and operating system well
my game engine:
allegro game creator
my operating system:
AmirOS

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
AW: Linking SFML with Eclipse on Windows
« Reply #10 on: January 05, 2014, 08:29:33 pm »
Nothing, it's just sfml-graphics, sfml-window, sfml-system, etc
The linker will know what extension to look for. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #11 on: January 05, 2014, 10:38:01 pm »
The linking order is important, it needs to be graphics, window, audio, network, system.
You can remember it, by thinking "graphics depends on window and system" / "audio depends on system" / "network depends on system".
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Linking SFML with Eclipse on Windows
« Reply #12 on: January 05, 2014, 11:45:57 pm »
Like this?
Why not just try it, but yes. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
AW: Re: Linking SFML with Eclipse on Windows
« Reply #13 on: January 06, 2014, 12:50:16 am »
It didn't work.
Let me get my crystal ball, maybe it will tell me what didn't work................. ::)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
AW: Linking SFML with Eclipse on Windows
« Reply #14 on: January 06, 2014, 07:55:30 am »
Try adding opengl32 to the linker list.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/