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

Author Topic: Getting started  (Read 4419 times)

0 Members and 1 Guest are viewing this topic.

Meredith

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Getting started
« on: June 22, 2013, 06:44:09 am »
Alright, I really want to get this to work. It looks like a great library that will do everything I want it to do. Unfortunately, I can't seem to get it to start working. Keep in mind, I'm a bit of a novice when it comes to using 3rd party libraries such as this. Specifically, the problem I get is this:

Quote
---------------------------
game.exe - Entry Point Not Found
---------------------------
The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library C:\Users\Meredith\Desktop\codeblocks\game\bin\Debug\sfml-graphics-2.dll.
---------------------------
OK   
---------------------------


I'll walk through how I got there, so maybe someone can catch what I'm doing incorrectly.

I'm using Code::Blocks.

I've been following the guide here: http://sfml-dev.org/tutorials/2.0/start-cb.php. I think I've followed every step, but obviously I must have done something incorrectly.

The script that I'm using is the one in the guide:

#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;
}
 

Here are my linker settings:




Compiler search directory:




Linker search directory:




Project directory:



Executable directory (bin->Debug in the project directory):



SFML's location (to show that I used the proper directory in the linker and compiler thing):



I also thought it would be a good idea to run my program through Dependency Walker. Here is the result:



I have no idea where to go from here.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Getting started
« Reply #1 on: June 22, 2013, 09:40:20 am »
The error usually means, that the libraries and your compiler are not compatible. What version of Code::Blocks/MinGW are you using and which SFML version did you download?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Meredith

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Getting started
« Reply #2 on: June 22, 2013, 10:05:38 am »
Yeah that's what I thought it was. I uninstalled Code::Blocks and SFML and reinstalled the latest versions.

While typing this, I realized that Chrome might have cached it and I redownloaded and older version.

I'll give it a go in Firefox and see what happens.

Edit:

Still getting it

Code::Blocks 12.11
SFML 2.0
« Last Edit: June 22, 2013, 10:11:34 am by Meredith »

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: Getting started
« Reply #3 on: June 22, 2013, 10:11:13 am »
Isn't gcc fussy about the link order? So you would need system/window/graphics rather than graphics/window/system

Meredith

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Getting started
« Reply #4 on: June 22, 2013, 10:15:53 am »
Isn't gcc fussy about the link order? So you would need system/window/graphics rather than graphics/window/system
Comparing my image



To the one in the guide



I have it in the right order.

I tried it in your order in case the guide was wrong, but I still got the same error.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Getting started
« Reply #5 on: June 22, 2013, 10:20:30 am »
Code::Blocks 12.11
SFML 2.0
Well that still doesn't tell us, what compiler (MinGW version) you're using and what exact SFML version (yes 2.0, but what did you download)...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Meredith

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Getting started
« Reply #6 on: June 22, 2013, 10:23:31 am »


This is the one I downloaded

I don't know how to check my MinGW version

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Getting started
« Reply #7 on: June 22, 2013, 10:25:21 am »
If I remember correctly, the version of MinGW shipped with Code::Blocks 12.11 requires the TDM (SJLJ) version.
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Getting started
« Reply #8 on: June 22, 2013, 10:29:28 am »
If I remember correctly, the version of MinGW shipped with Code::Blocks 12.11 requires the TDM (SJLJ) version.
Yes, as long as you've downloaded "Code::Blocks with MinGW", you'll need the TDM version.

You can check your compiler version by opening the console, then browse to the compiler's location and enter gcc -v.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Meredith

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Getting started
« Reply #9 on: June 22, 2013, 10:32:42 am »
If I remember correctly, the version of MinGW shipped with Code::Blocks 12.11 requires the TDM (SJLJ) version.


Beautiful!

Thanks for the help everyone

 

anything