pouët.net

Go to bottom

XP compability in VS2008 builds

category: general [glöplog]
 
Yesterday I imported a VS2005 solution into VS2008 on my Vista machine. After tweaking the custom build rules a bit, all the projects built and I could run it just fine.

Today I figured I'd try to run the output on an XP machine, but to my surprise it wouldn't run. LoadLibrary is failing with an error code of 0x36B1 (which I'm not quite sure what that is).

I opened the DLL in PeBrowse and noticed that MajorOperatingSystemVersion and MajorSubsystemVersion were both set to 5. So I figured that that was the problem and changed them to 4, but that didn't fix the problem.

Is this a problem any of you have had when upgrading to VS2008, and if so, how did you solve it?
added on the 2008-02-21 10:21:11 by mic mic
you're probably using the dynamically linked runtime and don't have the runtime dlls installed on the xp machine. (so don't worry, it also won't work on other vista machines without vs2008!)

in case that's actually the problem, the solution is this.
added on the 2008-02-21 10:30:13 by ryg ryg
Hmm, yeah, I'm using the Multithreaded DLL option for the CRT.
That kind of sucks though.. Guess I'll have to choose between using the statically linked CRT or compiling with VS2005.
added on the 2008-02-21 10:34:47 by mic mic
VS2005 has the exact same problem on systems that don't have the runtime dlls installed. So do VS2003 and VS2002.
added on the 2008-02-21 11:34:42 by ryg ryg
yeah, microsoft was even so nice to change the vcredist_x86 from VS2005 to VS2005 SP1... and the error messages when running apps where the DLLs are missing are sooo stupid...
added on the 2008-02-21 11:39:42 by bartman bartman
/NODEFAULTLIB ftw
added on the 2008-02-21 13:18:59 by dila dila
Quote:
/NODEFAULTLIB ftw


I'm using stuff in the CRT though. Perhaps I can make do with libctiny or something similar.
added on the 2008-02-21 13:42:29 by mic mic
you can always go for static linking. code will be smaller than exe + vcredist this way anyway
added on the 2008-02-21 14:11:46 by bartman bartman
yeah, static linking isn't really any problem unless you're going for 4k/64k intros in which case you shouldn't use the CRT anyway. :)
added on the 2008-02-21 14:21:46 by kb_ kb_
just write everything in 100% asm.
added on the 2008-02-21 14:26:21 by kusma kusma
Quote:
just write everything in 100% asm.


Actually, I use about 50% asm. But the other 50% still needs some CRT functions :P
added on the 2008-02-21 14:36:12 by mic mic
I hope you have some _really_ good reasons for writing 50% asm then.
added on the 2008-02-21 15:09:06 by d3pth d3pth
Not really. But this is a private project and not something I'm doing for work, so the practicality aspects are unimportant.
added on the 2008-02-21 15:35:29 by mic mic

login

Go to top