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

Author Topic: error in installing SFML  (Read 2706 times)

0 Members and 1 Guest are viewing this topic.

whynoob

  • Newbie
  • *
  • Posts: 6
    • View Profile
error in installing SFML
« on: October 15, 2013, 01:22:23 am »
i installed the files and configured everything properly, it work once then crashed and i realized some settings were missing so i did them too. i am using windows 8, visual studio 2012
then it doesnt work any more, these are the errors i get
Error   1   error LNK2019: unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main   C:\Users\%USERPROFILE%\Documents\Visual Studio 2012\Projects\Game\Source.obj   Game

i get 17 of those errors
i am trying this code
#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;
}

sorry if its a stupid error, but i am a noob
« Last Edit: October 15, 2013, 01:48:48 am by whynoob »

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: error in installing SFML
« Reply #1 on: October 15, 2013, 01:36:40 am »
That error means the linker can't find the sf::String constructor, which means you probably aren't linking to SFML properly.  Check your linker settings again.

If that doesn't work then please tell us what you mean by "it work once then crashed and i realized some settings were missing so i did them too", because that's hiding a hell of a lot of detail we have no way of guessing.  And just show us what all your settings are, because odds are you just haven't read the tutorial carefully enough.

whynoob

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: error in installing SFML
« Reply #2 on: October 15, 2013, 01:43:22 am »
sorry lol, i didnt put the preprocessor and it worked or one of the others and right after it worked it crashed, so i
then i rechecked the setting and did it properly well atleast i think i did it properly

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: error in installing SFML
« Reply #3 on: October 15, 2013, 01:49:04 am »
If you want to know for sure, either read the tutorial CAREFULLY (if something doesn't make sense just ask, though it's pretty explicit), or take screenshots of all the relevant settings so we can tell you which one doesn't match the tutorial or contradicts the other settings (since you can't mix static/dynamic or debug/release settings).

For the record, all libraries are like this, so the sooner you can make sense out of it the better.  SFML just happens to have tutorials that explain it.

whynoob

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: error in installing SFML
« Reply #4 on: October 15, 2013, 01:55:51 am »
i uploaded the screen shots can u please look at them

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: error in installing SFML
« Reply #5 on: October 15, 2013, 01:58:25 am »
You list sfml-graphics.lib as the only additional dependency, but that depends on the system and window modules so you need to link those too.  Also, if you want static linking, you need to link to the static versions of the libraries (with the -s) suffix.

Both of these things are very explicitly stated in the tutorial, so again, read it carefully.

whynoob

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: error in installing SFML
« Reply #6 on: October 15, 2013, 02:00:53 am »
problem is i already used those settings, however it wasnt working

whynoob

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: error in installing SFML
« Reply #7 on: October 15, 2013, 02:17:55 am »
i just did everything like the tut. but i still have 17 errors.
sorry if i am being retarded. Ixrec can you come on team viewer and help me with it

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: error in installing SFML
« Reply #8 on: October 15, 2013, 02:22:56 am »
Okay I've installed Team Viewer 8.  What's your ID?

whynoob

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: error in installing SFML
« Reply #9 on: October 15, 2013, 02:27:11 am »
151 537 189
65snw2

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: error in installing SFML
« Reply #10 on: October 15, 2013, 03:30:03 am »
If anyone's curious, he is now set up correctly.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: error in installing SFML
« Reply #11 on: October 15, 2013, 04:05:05 am »
If anyone's curious, he is now set up correctly.
And had TeamViewer still running... ::)
Let me be honest, posting TeamViewer codes publicly on a forum is about the stupidest thing one can make if one cares only oh so slightly about security.
Next time use PM or join some chat or anything.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything