Re: exe error, works on some pcs but doesnt on others

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Aegis Delacour ha scritto:

Hi..i have a problem where my code when compiled works only on some
PCs for a reason i dont really know. it gives me this error.

this application has failed to start because the application
configuration is incorrect. reinstalling the application may fix the
problem..

here is my code, if it is a compiler error on my part..could someone
compile it and send me the exe please
as i dont have access to visual studio anymore and i need to get this
fixed.

The only compiler error I get is a complain about this line:

HDC hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL);

when I compiled the code in Unicode mode (the default of VC++2008).
Putting an L before "DISPLAY" fixes that.

The error you mentioned may be caused by a manifest problem, or by lack of VC++ runtime libraries on the machine where you tried to run your app.
I would suggest you to use static linking of CRT to make your life and deployment process easier in this simple case.

You could build the exe yourself from your source code, with the freely available Visual C++ Express 2008:

http://www.microsoft.com/express/vc/

In fact, it seems to me that yours is a pure Win32 C++ project, you are neither using MFC nor ATL, so VC++2008 Express is just fine for building that code.

HTH,
Giovanni



.



Relevant Pages

  • Re: exe error, works on some pcs but doesnt on others
    ... PCs for a reason i dont really know. ... as i dont have access to visual studio anymore and i need to get this ... The only compiler error I get is a complain about this line: ... when I compiled the code in Unicode mode. ...
    (microsoft.public.vc.mfc)
  • Re: Which new language to learn?
    ... hardware salesman wet-dream generating, software applications with the ... compiler was a death sentence, so I'm not sure that's relevant. ... > If you dont get a really specific job you dont earn that great - not ... particular projects, inventions, patents, etc. Regular managers ...
    (comp.programming)
  • Re: Where to Start?
    ... > I want to buy a new compiler but dont know which. ... Currently im running Windows ... Microsoft is closer to be standard than Borland, but I might be very wrong. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Where to Start?
    ... > I want to buy a new compiler but dont know which. ... > Im confused by all the .NET jargon and dont understand what it means. ... You should ask about it in a .NET newsgroup. ...
    (comp.lang.cpp)
  • Re: TypeLoadException
    ... > James wrote: ... >> I have an EXE that is using a sub assembly. ... >> My assemly is not strongly named so i dont know why it is checking for the ... >> version of the sub assembly when loading at runtime. ...
    (microsoft.public.dotnet.framework.compactframework)