Skip to main content
GameDev.net gamedev.net
🔒 Locked

VS2005 creates useless .exe ???

Started by VanKurt Mar 29, 2006 at 3:35 AM 7 replies 1.7k views
Original Post
VanKurt
VanKurt
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!
Kalasjniekof
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.



DaBono
DaBono
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.
VanKurt
VanKurt
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?
Nitage
Nitage
You might have .NET extensions turned on, even though you aren't using them
Evil Steve
Evil Steve
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.
Boder
Boder
The 2003 exe should work.

For VC++ 2005, see here: VC 2005 exe
VanKurt
VanKurt
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!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.