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

Author Topic: This application has failed to start because the application  (Read 18794 times)

0 Members and 2 Guests are viewing this topic.

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« on: February 12, 2008, 03:35:48 am »
Hey!

I am getting this error when trying to run the application with some tutorial code:

This application has failed to start because the application configuration is incorrect

Doesn't matter if release or debug build.

VC++ 2008 Express
Linked like tutorial said...
Settings like tutorial said...

Thanks!
Greets

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
This application has failed to start because the application
« Reply #1 on: February 12, 2008, 04:54:13 pm »
I used to get this error too, the problem was that I was using some old libaries compiled in VS2005, it screwed up my manifest file.

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« Reply #2 on: February 12, 2008, 06:09:21 pm »
But I've just created a new project  :(

evilertoaster

  • Newbie
  • *
  • Posts: 9
    • View Profile
This application has failed to start because the application
« Reply #3 on: February 12, 2008, 08:41:29 pm »
are you sure you're using \lib\vc2008\static or \lib\vc2008\dynamic for your library locations and not \lib\vc2005\static or \lib\vc2005\dynamic?

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« Reply #4 on: February 13, 2008, 07:31:51 am »
Yea...

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
This application has failed to start because the application
« Reply #5 on: February 13, 2008, 12:16:15 pm »
Could you post the complete error message? I want to make sure it's the same I got a while back. Does it say anything about the manifest file, if so, have you checked it?

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« Reply #6 on: February 13, 2008, 05:11:08 pm »
Unable to start program '...TestConsole1.exe'.

This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.



This error doesn't occur when having an empty main function, just when I am inserting some sfml code like...

sf::VideoMode Mode = sf::VideoMode::GetMode(0);

No matter if debug build/debug libs or release build/release libs.
My debug setting is "Multi-Threaded Debug DLL" and my release setting is "Multi-Threaded DLL". When I am changing to non-DLL:

Debug:
Code: [Select]

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library



Release:
Code: [Select]

1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: __invalid_parameter_noinfo already defined in LIBCMT.lib(invarg.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library



I don't know about manifest files, but these are mine (After a build with DLL runtime):

Debug (...embed.manifest):
Code: [Select]

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.20706.1" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>



Debug (...intermediate.manifest):
Code: [Select]

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.20706.1' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>



Release (...intermediate.manifest):
Code: [Select]

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>



 :?

Thanks!
Greets

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
This application has failed to start because the application
« Reply #7 on: February 13, 2008, 09:21:55 pm »
It's the exact error message I got, but it seems to not be the exact same problem, this is what my manifest file looked like when i got this message:

 
Code: [Select]
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>


...where this part was the problem, as I was using old libaries:

Code: [Select]
 <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>


As I'm no expert on manifest files I don't know what's wrong with yours, but looking at my current (working) manifest files they look exactly the same as yours except for the following part (which isen't in my files at all):

Code: [Select]
<dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.20706.1' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
  </dependency>


Have you tried to simply remove the piece of code above (I don't think it should be there if you are building in debug-mode?)? After I did it my program worked, but that was just a temporary fix as a new manifest file is generated everytime you build your program you have to delete this everytime. But it was a good way to find what was wrong.

Hopefully someone here knows more about this stuff and can help you out.

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« Reply #8 on: February 13, 2008, 09:55:56 pm »
Thanks, but without success.

Greets

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« Reply #9 on: February 20, 2008, 05:48:43 am »
Laurent?
Can you help maybe?
Will you fix it with the next release?

Thanks!
Greets

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
This application has failed to start because the application
« Reply #10 on: February 20, 2008, 06:46:05 am »
There's no problem with the VC++ 2008 build of SFML, it's just that you're using a different version or service pack.

Actually, a lot of people are getting this error. It seems that Visual C++ 2008 has become highly incompatible with itself.

One solution is to rebuild SFML libraries with your version of VC++ 2008. I think there are other solutions, you need to search Google to find out more. You'll find tons of links, it's a very common problem.
Laurent Gomila - SFML developer

Ako

  • Newbie
  • *
  • Posts: 14
    • View Profile
This application has failed to start because the application
« Reply #11 on: February 20, 2008, 07:46:29 am »
But what is the right way?
"Multi-Threaded (Debug)" or "Multi-Threaded (Debug) DLL"?

I mean, shall I get rid of the error message or of the linker errors?
For what to search on google? I am a very newb at this stuff, sorry.

Thanks!
Greets

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
This application has failed to start because the application
« Reply #12 on: February 20, 2008, 08:01:59 am »
Quote
But what is the right way?
"Multi-Threaded (Debug)" or "Multi-Threaded (Debug) DLL"?

Don't care about it. You must use "Multi-Threaded (Debug) DLL", but this should be the default.

Quote
For what to search on google?

This very typical error message :
Code: [Select]
This application has failed to start because the application configuration is incorrect
Laurent Gomila - SFML developer

Beaker

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://corvuscorone.net/
This application has failed to start because the application
« Reply #13 on: February 20, 2008, 12:38:29 pm »
I had previously encountered this problem and found it to be caused by windows side-by-side. The windows event log should say why the program failed to start and if it is a SxS problem then this should help:

http://msdn2.microsoft.com/en-us/library/ms235342.aspx

It basically explains how to redirect references to old libraries to the current ones.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
This application has failed to start because the application
« Reply #14 on: February 23, 2008, 04:49:47 pm »
First of all, sorry, I am a total noob :); yesterday I began using Visual C++ 2008 Express, today I downloaded SFML. I installed it the way I saw in the tutorial (Added include and static lib directories), but I don't know how to link it correctly. I also read lots of other posts concerning this problem, but no one could really help me.

Lots of people say this could be done by rebuilding/recompiling the libraries in VC 2008. Unfortunately, I have no idea how to do this. I mean you can't open *.lib Files directly with VC, so I added them to Project Resource Files, but I get errors all the time. Without them, it doesn't work either.

Actually, I've made only one entry into Additional Dependencies: sfml-system.lib (Configuration is Active(Release)). When I include <SFML/System.hpp>, my program works, but as soon as I use any SFML commands (e.g. the sf::Clock class), I get errors which say the Exe File can't be started (wrong execution configuration). I tried several combinations of linking commands, but it didn't work at all.

I would like to know how to rebuild the Libs (for example sfml-system.lib) exactly because I haven't got any experience with VC and SFML (I always used Bloodshed Dev C++ with SDL). By the way, I am using Windows Vista, might there be any problem? Please help me, it's possible I am on a completely wrong way :wink: ...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything