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

Author Topic: Is it possible to use SFML with Eclipse CDT using MinGW (DW2)?  (Read 5042 times)

0 Members and 1 Guest are viewing this topic.

enigma22134

  • Newbie
  • *
  • Posts: 13
    • View Profile
Is it possible to use SFML with Eclipse CDT using MinGW (DW2)?
« on: December 28, 2015, 05:01:56 pm »
I've setup the eclipse CDT "C/C++ programming tooling" with MinGW to build c++ . I really like my custom ui setup with eclipse I was wondering if I could potentially setup SFML to work with this setup?

There's a Code::Blocks using MinGW tutorial; I was wondering if I should be able to setup SFML with my eclipse setup since the compiler is the same as Code::Blocks. Does anyone have any insight on this? The options are slightly different in the compiler settings, but I think it could work?

I've already made some attempts at getting it to work (as you can see in my pictures), but I figured I should first inquire if this is even a reasonable pursuit before I continue.

 I'm in university and still a bit of a newbie to advance computer programming and I don't yet have a deep understanding of the underlying structure (linker, etc.) behind c/c++ development.

Attached/linked are screenshots of the options I can access in MinGW through eclipse. Thank you for any insight. |)

http://i.imgur.com/sWuz2Eh.png
http://i.imgur.com/AEO4Kac.png


OS: windows 7 64bit
SFML: 2.3 32bit

SpeCter

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: Is it possible to use SFML with Eclipse CDT using MinGW (DW2)?
« Reply #1 on: December 28, 2015, 08:19:37 pm »
Just compile sfml yourself and you should be good to go.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Is it possible to use SFML with Eclipse CDT using MinGW (DW2)?
« Reply #2 on: December 30, 2015, 05:54:41 pm »
Unless you use the same exact compiler which has been used to create the SFML binaries, you'll have to recompile.

The setup should similar to Code::Blocks or most other IDE. Specify the include dir, specify the lib dir, add the required libs, compile, link and run (and for dynamic linking copy the DLLs next to the exe).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

enigma22134

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Is it possible to use SFML with Eclipse CDT using MinGW (DW2)?
« Reply #3 on: December 30, 2015, 07:49:44 pm »
Unless you use the same exact compiler which has been used to create the SFML binaries, you'll have to recompile.

The setup should similar to Code::Blocks or most other IDE. Specify the include dir, specify the lib dir, add the required libs, compile, link and run (and for dynamic linking copy the DLLs next to the exe).
I got it compiling and I am able to run the executable with the above setup. :) I guess I lucked out on the compiler version.

However, for some reason, I cannot access the network library; it's probably an error on my part.

Just compile sfml yourself and you should be good to go.
Is there a tutorial or documentation on how to do this? I see the tutorial for compiling SFML with CMake http://www.sfml-dev.org/tutorials/2.3/compile-with-cmake.php. Admittedly, I am relatively new to programming (3 years self taught experience, 4 months of class); so, I'm not sure if that is how I go about compiling SFML myself. 
« Last Edit: December 30, 2015, 07:55:21 pm by enigma22134 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Is it possible to use SFML with Eclipse CDT using MinGW (DW2)?
« Reply #4 on: December 31, 2015, 12:12:30 am »
Yes, you have to use CMake to build SFML. Use the linked tutorial.

Regarding the network lib, unless you provide further information we can't help you. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything