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

Author Topic: the application was unable to start correctly  (Read 3837 times)

0 Members and 1 Guest are viewing this topic.

ansh93

  • Newbie
  • *
  • Posts: 10
    • View Profile
the application was unable to start correctly
« on: September 08, 2012, 06:42:07 pm »
#include <SFML/System.hpp>
#include <iostream>

using namespace sf;
using namespace std;

int main()
{
        float f=0.5;
    Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        Sleep(f);
    }

    return 0;
}

this is the code I am using and i am getting a runtime error
"The application was unable to start correctly (0x0150002),Click Ok to close the application."

I have copied all the dll's properly. As well as included sfml-windows-d.lib, sfml-system-d.lib.
system is "/SUBSYSTEM:CONSOLE"
installed all the redistribute packages required.
Now can some please help me with the problem.
I am using Visual studio 2010 ultimate
and windows 7 64 bit architecture.
And also i am using version 1.6 of sfml
« Last Edit: September 08, 2012, 07:01:40 pm by ansh93 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: the application was unable to start correctly
« Reply #1 on: September 08, 2012, 07:25:05 pm »
Have you recompiled SFML?
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: the application was unable to start correctly
« Reply #2 on: September 08, 2012, 07:28:29 pm »
I am using Visual studio 2010 ultimate
and windows 7 64 bit architecture.
And also i am using version 1.6 of sfml
I strongly advise you against the use of SFML 1.6, because it's over 2years old (= updated), has quite a few nasty bugs and lacks a lot of new features that SFML 2 provides. Additionally there are already binaries for SFML 2rc.
If you still want to compile SFML on your own, you can follow the official tutorial on how to build SFML 2 with CMake. ;)
« Last Edit: September 08, 2012, 07:30:15 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ansh93

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: the application was unable to start correctly
« Reply #3 on: September 08, 2012, 08:08:02 pm »
now i have changed everything for SFML 2

now i am getting these errors
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>C:\Users\Voldy\Documents\Visual Studio 2010\Projects\sfml\Debug\sfml.exe : fatal error LNK1120: 2 unresolved externals

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: the application was unable to start correctly
« Reply #4 on: September 08, 2012, 08:48:23 pm »
If you want to link statically, you have to use the libraries with the -s sufix and define SFML_STATIC, if you want to link dynamically, don't define SFML_STATIC and don't use the libraries with the -s sufix.

Or did that problem come from mixing debug and release library? Don't quite remember... ???
But don't mix release and debug modes either! ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/