Running Visual C++ 2008 Express SP1 development tools on Windows XP

Started by Vortex, September 02, 2008, 07:59:24 PM

Previous topic - Next topic

Vortex

With thanks to Hutch who explained the technique, you can use ml.exe 9.00 , the latest version of MS Macro Assembler. The assembler runs fine on Windows 2000 SP4 patched with all the necessary hotfixes but to run ml.exe 9.00 and cl.exe 15.00 on Windows XP, you need to do some tweakings. You can get SideBySide errors in the event log if you try to run those tools on a bare XP system.

Here is the list of some tools and DLLs coming with VC++ 2008 Express Sp1 :

QuoteThe folder named 1033 and it's content
c1.dll
c1xx.dll
c2.dll
cl.exe
cl.exe.config
cvtres.exe
dumpbin.exe
editbin.exe
lib.exe
link.exe
link.exe.config
ml.exe
mspdb80.dll
msvcm90.dll
msvcp90.dll
msvcr90.dll
nmake.exe

Here is my method :

Go to the C:\WINDOWS\WinSxS folder
Create there a folder named x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375
Under this new folder, put a copy of msvcr90.dll, msvcp90.dll and msvcm90.dll

This is how it should look :

C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcr90.dll
C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcm90.dll
C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcp90.dll


Go to the C:\WINDOWS\WinSxS\Manifests folder

Copy the attached file named x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375.manifest to the Manifests folder.

Notice that the file extension is .manifest

The .manifest file :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInheritable></noInheritable>
    <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    <file name="msvcr90.dll" hashalg="SHA1" hash="e0dcdcbfcb452747da530fae6b000d47c8674671"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>KSaO8M0iCtPF6YEr79P1dZsnomY=</dsig:DigestValue></asmv2:hash></file> <file name="msvcp90.dll" hashalg="SHA1" hash="81efe890e4ef2615c0bb4dda7b94bea177c86ebd"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>ojDmTgpYMFRKJYkPcM6ckpYkWUU=</dsig:DigestValue></asmv2:hash></file> <file name="msvcm90.dll" hashalg="SHA1" hash="5470081b336abd7b82c6387567a661a729483b04"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>tVogb8kezDre2mXShlIqpp8ErIg=</dsig:DigestValue></asmv2:hash></file>
</assembly>


This is how it should look :

C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375.manifest

You are ready to run ml.exe 9.00 and cl.exe 15.00

I tested all this procedure on a newly installed Windows XP Pro Sp3 system with no any frameworks installed.

Another method without all those tweakings is to install the Microsoft Visual C++ 2008 Redistributable Package

[attachment deleted by admin]

hutch--

Thanks for doing all of this research Erol, the redistributable package is small and painless to install AND it installs on my win2000 sp4 fine.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

BlackVortex

Nice post/guide ! Very useful !

What is the general difference of ml v9 to the ... standard 6.xx series. It's not really meant for assembly programmers, is it ? It's tailored to the inline asm feature, right ?

hutch--

Nah,

Its a complete ML.EXE that builds all that the earlier versions build and its had some bugs fixed since ML version 8.0.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex

Hi Hutch,

ml.exe 9.00 has the same problem as the previous version 8.00 : the command line support ( *.asm ) is broken.

It's easy to setup the environment variables to run the new version of cl.exe, here is a quick demo :

SET PATH=D:\Microsoft Visual Studio 9.0\VC\bin;%PATH%
SET INCLUDE=D:\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\PSDK\Include

cl /c /Oty2 /Zl /Gs /GS- /FoDemo.OBJ Demo.c
link /SUBSYSTEM:WINDOWS /NODEFAULTLIB /LIBPATH:\masm32\lib Demo.obj crt0\crt0.lib kernel32.lib user32.lib gdi32.lib msvcrt.lib

[attachment deleted by admin]

drizz

Quote from: hutch-- on September 03, 2008, 07:03:43 AM... and its had some bugs fixed since ML version 8.0.
It's had some bugs fixed since ml v6.14! mainly the "dup-with-initialized-data" bug and "zero-extending arguments" bug. FINALLY!!  :dazzled: :boohoo:  :lol
i'm switching to ml v9.00.30729.01  !! :P
The truth cannot be learned ... it can only be recognized.

BlackVortex

Quote from: drizz on September 03, 2008, 09:27:46 PM
Quote from: hutch-- on September 03, 2008, 07:03:43 AM... and its had some bugs fixed since ML version 8.0.
It's had some bugs fixed since ml v6.14! mainly the "dup-with-initialized-data" bug and "zero-extending arguments" bug. FINALLY!!  :dazzled: :boohoo:  :lol
i'm switching to ml v9.00.30729.01  !! :P
Better switch to jwasm    :green    :green

drizz

Quote from: BlackVortex on September 03, 2008, 09:45:49 PMBetter switch to jwasm    :green    :green
hehe Like i'm blind to see what great work japheth is doing, i'm already using his win32 include files, now i'm just waiting for JWASM32 release  :green  :green enough OT  :P
The truth cannot be learned ... it can only be recognized.


Vortex