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

Author Topic: my dumb questions: installing sfml on codeblocks...  (Read 3282 times)

0 Members and 1 Guest are viewing this topic.

blacksages

  • Newbie
  • *
  • Posts: 15
    • View Profile
my dumb questions: installing sfml on codeblocks...
« on: June 02, 2017, 07:12:02 pm »
Hi, I'm sorry if it sound obvious to you but it's absolutely not for me.

I've read the tutorials about sfml and codeblocks but, looking at other tutorials they have winmm, opengl32, ws2_32, gdi32 but I don't, I have others PLUS sfml-main. So what's up? (I'm talking about the files.a in the lib directory of SFML 2.4.1 folder)

I downloaded the version for GCC 4.9.2 TDM (SJLJ) - 32-bit, I have the latest GCC through latest codeblocks version.

So after that I just copied that other guy link libraries, I copied the code example of sfml tutorial https://www.sfml-dev.org/tutorials/2.4/start-cb.php, but i got:


So I tried to change the link order as I 've read somewhere that codeblocks does pay attention to link order, I got this:


with sfml-audio-s at the bottom, and yes I wrote SFML_STATIC in #defines, but doesn't work

last matter, I modified a copy of gnu for link and stuff instead of right-clicking the project>build options>...
As it is the compiler doesn't have "release" or "debug", so what about that? Does it handle it automatically? I don't know.
note: Yes I selected my modified gnu for my src file, for both debug and release, don't know if it's supposed to work like that...

edit: why are my images not showing...? even though I used img /img  between brackets with
http://www.hostingpics.net/viewer.php?id=305820e1da6c56f9b8c544ef106a9982f64f57.png as first pic
and
 https://gyazo.com/7ad632742e152f7f1aaa9856a241f77e as second...
« Last Edit: June 02, 2017, 07:15:42 pm by blacksages »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: my dumb questions: installing sfml on codeblocks...
« Reply #1 on: June 02, 2017, 08:18:20 pm »
Just follow the official tutorial it contains all the info you need, but read carefully. If you start jump from one tutorial to the next and never finish reading one in detail all you'll achieve is chaos.

The first error tells you exactly what the issue is. It can't fibd sfml-networks-s, because it's sfml-network-s without the "s" - details! ;)

System dependencies like winmm are, as explained in the official tutorial, only needed when you link SFML statically. The system dependencies aren't shipped with SFML as they are part of your compiler toolchain/system, meaning you just have to specify them and not copy anything around.

The images can't be embedded because your weird image hoster doesn't directly like the image. Instead just use imgur.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blacksages

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: my dumb questions: installing sfml on codeblocks...
« Reply #2 on: June 02, 2017, 09:00:08 pm »
And what's the difference between

and this
?

is just setting the compiler fine? what about release and debug? should I use the not-modified compiler and set the release and debug from build option? what's the difference?

note: http://imgur.com/JtpS20S (first pic)
http://imgur.com/2fcqZma (second pic)

used imgur but won't show...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: my dumb questions: installing sfml on codeblocks...
« Reply #3 on: June 02, 2017, 09:36:22 pm »
Again, just follow the steps in the tutorial. Only once you did all the steps precisely as described and once you actually understand their meaning, you can start experimenting with setting things up differently.
Meaning don't add things to the compiler settings as it's not described in the tutorial. ;)

The inages don't show because again you just link the website and not the actual image. If you click on it and you get show more than just the image, like a navigation, login button, etc. then you're linking a website and not the image. Right click on thd image and select "copy image address", that will be the direct image link.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blacksages

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: my dumb questions: installing sfml on codeblocks...
« Reply #4 on: June 02, 2017, 10:18:13 pm »
I did everything it was said, but i still get error...

NGM88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: my dumb questions: installing sfml on codeblocks...
« Reply #5 on: June 02, 2017, 10:41:45 pm »
maybe this helps

this is the order I use in VS

RELEASE:
sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;opengl32.lib;freetype.lib;jpeg.lib;winmm.lib;gdi32.lib;sfml-audio-s.lib;openal32.lib;flac.lib;vorbisenc.lib;vorbisfile.lib;vorbis.lib;ogg.lib;sfml-network-s.lib;ws2_32.lib;

DEBUG:
sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-system-s-d.lib;opengl32.lib;freetype.lib;jpeg.lib;winmm.lib;gdi32.lib;sfml-audio-s-d.lib;openal32.lib;flac.lib;vorbisenc.lib;vorbisfile.lib;vorbis.lib;ogg.lib;sfml-network-s-d.lib;ws2_32.lib;

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: my dumb questions: installing sfml on codeblocks...
« Reply #6 on: June 02, 2017, 11:00:02 pm »
The order in VS doesn't matter as VS's linker is "smart" enough to find out the dependencies.
But the libraries are in the correct order, except that for GCC (Code::Blocks) you don't specify the .lib.

The errors look like you've link sfml-system before sfml-window.
Either that, or you're not using a 100% matching compiler version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blacksages

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: my dumb questions: installing sfml on codeblocks...
« Reply #7 on: June 02, 2017, 11:01:11 pm »
oh my gooooooooooooooooooooooooooooood, it works, hahahahahahaha *euphoric*
thank you good sir/lady

blacksages

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: my dumb questions: installing sfml on codeblocks...
« Reply #8 on: June 02, 2017, 11:05:49 pm »
though the examples don't work.. I'll try another order... phew...

 

anything