• Advertisement
Sign in to follow this  

VS2005 creates useless .exe ???

This topic is 4351 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there! I've got a serious problem here. On my machine I have installed VS 2003 and VS2005 plus the .NET 2.0 Framework. All apps (games) I compile with these two work great on my machine. On another machine (having the same software installed) everything is OK, too. But when I try to run these apps on other computers who don't have any VisualStudio and no .NET 2.0, I instantly get a windows error message "The application failed to initialize properly 0xc0150002" or something... Another thing: the code compiled with VS2005 is 283 KB, while the same code compiled with VS2003 is only 164 KB. Something's definately wrong here! Are there some magic compiler options that I have to set to avoid these problems? Thanks so much for your help!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Try installing the .NET 2.0 redistributable (not the SDK) on the computer that's having problems.

Share this post


Link to post
Share on other sites
Quote:
Original post by VanKurt
But when I try to run these apps on other computers who don't have any VisualStudio and no .NET 2.0, I instantly get a windows error message "The application failed to initialize properly 0xc0150002" or something...

This is normal behaviour. If your program uses .NET users should have installed the same version of it on their computer. Compile to native code if you want to avoid this.



Share this post


Link to post
Share on other sites
Quote:
Original post by Kalasjniekof
Quote:
Original post by VanKurt
But when I try to run these apps on other computers who don't have any VisualStudio and no .NET 2.0, I instantly get a windows error message "The application failed to initialize properly 0xc0150002" or something...

This is normal behaviour. If your program uses .NET users should have installed the same version of it on their computer. Compile to native code if you want to avoid this.


Wow! That's user-friendlyness for you. No You need .NET 2.0 to run this program or something, just a hex-address and a crash.

Share this post


Link to post
Share on other sites
Wait a moment! I don't use .NET 2.0 (AFAIK)
I've created a normal Win32 app, no managed code, no windows forms, no nothing. Just plain Win 32, OpenGL and stuff...
Is .NET 2.0 somehow "automatically" added to my app?

Share this post


Link to post
Share on other sites
You might have .NET extensions turned on, even though you aren't using them

Share this post


Link to post
Share on other sites
Nope, no .NET or anything is added automagically. Sounds like a problem with your code. Do the test machines have the correct runtime libraries on them? I can;t remember the exact files, but there's 2 or 3 DLLs called something like "msvcrt81.dll" that VC2005 apps need to have with them.

Although, that should bring up a "The DLL could not be found" message. Try creating a very simple app that does nothing more than enter WinMain() and return from it and see if you still get the problems.

Share this post


Link to post
Share on other sites
Thanks guys, you made my day :-)

"oad up your project settings, and go to C/C++ -> Code Generation
Next change runtime library from Multi-threaded DLL to Multi-threaded and rebuild. That should sove your problem"

That did it!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement