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

Author Topic: SFML + Eclipse. Nothing happens when I press "Run"  (Read 7506 times)

0 Members and 1 Guest are viewing this topic.

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
SFML + Eclipse. Nothing happens when I press "Run"
« on: September 25, 2015, 12:05:47 am »
Hi,

I'm trying to run SFML with Eclipse Luna + MinGW, but it does nothing.
All libraries are assigned in settings, exactly as it says in code blocks tutorial on the site.
Project seems to build with no errors, no warnings.
Both Java 32 bit and 64 bit are installed.

Any ideas what's might be wrong? Thanks.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #1 on: September 25, 2015, 10:44:19 am »
but it does nothing.
Which means...? What is your code supposed to do?

Seems like an IDE- and not SFML-related problem. Maybe people at an Eclipse forum can help you more :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #2 on: September 25, 2015, 02:59:13 pm »
but it does nothing.
Which means...? What is your code supposed to do?

Seems like an IDE- and not SFML-related problem. Maybe people at an Eclipse forum can help you more :)
I'm just trying to run a code from tutorial page.
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }
    return 0;
}

Meanwhile, in the same project, if I replace the example code, with just "Hello World" - console shows me an output pretty fine...
May be you are right about asking for help on eclipse forum, as I got SFML working in VS 13 in few minutes...

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #3 on: September 25, 2015, 05:33:39 pm »
I meant: "it does nothing" is a really bad error description. How are we supposed to help you with that?

What happens? Absolutely nothing at all? No console, no program startup, ...?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #4 on: September 25, 2015, 06:05:22 pm »
It builds with no errors or warnings, and then empty console pop up.
(Above console the small text box with "<terminated> executableName.exe")
That's pretty much it. I'm new to both Eclipse and SFML, so sorry if I'm not giving you what you mean..

edit
And yes, the program window doesn't show up at all.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #5 on: September 25, 2015, 06:13:29 pm »
Do you link SFML statically? If not, does the program find the right *.dll files (the one you compiled/downloaded with/for VS13 aren't compatible).

Have you tried to run the executable yourself? (it's located in the Debug folder iirc)



AlexAUT

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #6 on: September 25, 2015, 07:22:51 pm »
Do you link SFML statically? If not, does the program find the right *.dll files (the one you compiled/downloaded with/for VS13 aren't compatible).

Have you tried to run the executable yourself? (it's located in the Debug folder iirc)



AlexAUT
Dynamically, I installed VS13 on another laptop so I'm pretty sure I'm using right DLLs for MinGW.
Right click + run on exe file does exactly the same "nothing".

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #7 on: September 25, 2015, 07:38:47 pm »
Launch it in a debugger, put a breakpoint early in your program's execution, and step line by line until you find out the reason for the (seemingly) early exit.

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #8 on: September 25, 2015, 07:40:26 pm »
Ok, I've tried to run exe file directly from project folder, and it gives me this:


I had the same problem at start with VS13 so I threw all DLLs from SFML bin folder to executable file, and got this:


Probably I'm doing smth wrong =/

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #9 on: September 25, 2015, 09:37:26 pm »
Launch it in a debugger, put a breakpoint early in your program's execution, and step line by line until you find out the reason for the (seemingly) early exit.
Doesn't really look like the program even starts... I set the breakpoint, run a debug, it doesn't redirect me to debug view so I'm going there myself and there's pretty much nothing except <terminated>.
I should probably just give up and go with VS13 then. Eclipse seems really inconvenient for me.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10863
    • View Profile
    • development blog
    • Email
SFML + Eclipse. Nothing happens when I press "Run"
« Reply #10 on: September 25, 2015, 10:08:29 pm »
The DLLs you used are not compatible with the compiler you use.

Where did you get the DLL from and what compiler do you use?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #11 on: September 25, 2015, 10:43:20 pm »
The DLLs you used are not compatible with the compiler you use.

Where did you get the DLL from and what compiler do you use?
DLLs from this site. GCC 4.9.2 MinGW (DW2) - 32-bit.
And compiler is MinGW.

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #12 on: September 25, 2015, 11:31:05 pm »
Yep. That would be it. Which version of MinGW did you download? Or, where did you download MinGW from? (There are several versions and distributions of MinGW.) It's not Eclipse, it's your compiler.

balbes

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #13 on: September 26, 2015, 12:23:41 am »

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: SFML + Eclipse. Nothing happens when I press "Run"
« Reply #14 on: September 26, 2015, 01:03:56 am »
32 bit or 64 bit? I'm assuming you're using the 64 bit compiler with the 32 bit DLLs then. Or you have the SJLJ compiler and the DW2 DLLs.

 

anything