HOWTO: get some of the "not included" stuff when using the VisualC++ Compiler Tookit 2003

J

Jonathan Wilson

Firstly, to get msvcrt.lib, install the .NET framework SDK. The version of
msvcrt.lib included there is the exact same one as comes with Visual Studio
..NET 2003.
There are some other things that might be usefull (e.g. the debug version
of msvcrt.lib) but msvcrt.lib is the most usefull thing.

Secondly, install the latest version of the Microsoft Platform SDK.
The "64-bit" compiler will provide versions of undname.exe, nmake.exe,
lib.exe, cvtres.exe, dumpbin.exe and editbin.exe that (at least from my
cursory inspection) appear to be useable.
Other stuff from Microsoft SDK\Bin (e.g. midl.exe, mktyplib.exe. rc.exe,
mc.exe and so on) is also usable as a substitute for those same files as
included with Visual Studio .NET 2003.
Also, the included "64-bit" code for MFC and ATL may be of some use on
32-bit windows too.

Also, install the DirectX SDK and DirectX Media SDK if you want to develop
using those technologies.

Naturally, this wont provide you with all the stuff visual C++ .NET 2003
would provide you with.
Most notably you wont have some of the *.obj files from the lib folder
(i.e. chkstk.obj, nochkclr.obj, thrownew.obj)
binmode.c comes with the IA64 CRT source code in the platform SDK, as does
commode.c, fp10.c, newmode.c, setargv.c and wsetargv.c, compile these files
and you will have usable versions of the matching CRT obj files.
nochkclr.c has a comment in it stating its only used if you dont like with
the CRT.
I do not know where one would get code for chkstk.obj, thrownew.obj or
nochkclr.obj (or even if those obj files are actually usefull for much).

And you also wont have msvcrprt.lib (which means that using /MD for C++
apps is kinda difficult :).
This:
http://users.tpg.com.au/adsloptd/msvcprt.def
is a .DEF file created using dumpbin /exports on msvcp71.dll.
When converted into a .LIB file with lib /DEF:msvcprt.def, it will generate
an import library for msvcp71.dll that should be usable. (I didnt do one
for msvcp71d.dll because msvcp71d.dll is not in anything freely
downloadable from MS, unlike msvcp71.dll which is easy enough to get)

However, in addition to being an import library, msvcprt.lib also contains
3 obj files, nothrow.cpp, newop_s.cpp and newaop_s.cpp.
I dont know where you could get nothrow.cpp, newop_s.cpp or newaop_s.cpp (I
also dont know if they are important or not). The SDK CRT comes with
newop_s.cpp and something called newop2_s.cpp but I dont know if either of
those is of any use with the Visual C++ Compiler Tookit 2003 and
msvcr71.dll/msvcp71.dll.

Of course, if you can get files from a visual C++ install (such as
vcspawn.exe, vcprojectengine.dll and vcprojectui.dll) you can do more (like
getting vcbuild.exe to work), this list only covers stuff that you can get
for free :)

Hopefully this information on how to do more with the Visual C++ Compiler
Tookit 2003 is usefull to someone.

Also, IANAL so I cant say for sure if the licence aggreements given for the
use of the various items mentioned above permits their useage with the
Visual C++ Compiler Tookit 2003 and do let me know of anything to add to
this HOWTO or any feedback etc.
 
R

Ronald Laeremans [MSFT]

Trying to use the 64-bit versions of ATL and MFC that ship with the Platform
SDK with a 32-bit compiler will simply not work.

Ronald Laeremans
Visual C++ team
 
J

Jonathan Wilson

the stuff under Microsoft SDK\src\mfc seemed to compile fine for me with a
32-bit compiler (in fact, there appears to be a #ifdef _X86_ block with X86
inline ASM in olecall.cpp)

So it compiles (and probobly works).
Whether compiling it (and using it) on IA32 is legal is another issue
altogether (IANAL so I wont go there) but it can be done.
 
R

Ronald Laeremans [MSFT]

I have answered several customer questions on various issues they
encountered trying to do this. Compiling just the headers might work, but
you are extremely likely to run into all kinds of issues when you start
using a significant part of the functionality.

Ronald
 
J

Jonathan Wilson

ok, fair enough, if someone from microsoft says that you will hit problems
using that code, I would assume they are right.
Its just that looking through the code in Microsoft SDK\src\mfc, I dont see
anything in there that is 64-bit specific so I assumed it would work on
IA32 as well.
 
R

Ronald Laeremans [MSFT]

Hi Jonathan,

This specific code base has never been tested / validated to do 32-bit
development.

Ronald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top