---------------
Christof Meerwald@ms_sdk.dm

home
> prog
>> dm
>>> ms sdk

translate to German (by SYSTRAN)

Using Microsoft's Latest Platform SDK with Digital Mars C/C++

Because the freely available Digital Mars C/C++ compiler only comes with a minimal and outdated set of Win32 libraries, I have put together some instructions on how to use Microsoft's latest (Platform) SDK with Digital Mars C/C++.

You have two options for using Microsoft's SDK with Digital Mars. You can either replace DM's optlink with the Open Watcom linker (see my Open Watcom Tools page) or you can convert the Microsoft-style COFF libraries into OMF libraries. Unfortunately, the latter requires you to have the Microsoft link program available (which was once included in some older Platform SDK or Visual C++ 6.0).

In any case you have to install the Platform SDK and apply a simple patch to the header files.

  • install Microsoft's latest Platform SDK (include and lib files)
  • make some minor modifications to the header files:
    cd sdk\include
    patch -sp1 < ..\platform-sdk.diff
    

Using the Open Watcom Linker instead of DM's optlink

See my Open Watcom Tools page for more information.

Converting the Platform SDK's Import Libraries Using Microsoft's link

  • convert the import libraries to the old COFF format using "link /lib /convert library.lib" (make sure to use Microsoft's link)
    for %i in (*.lib) do c:\sdk\bin\link /lib /convert %i
    
  • convert the resulting COFF libraries to Digital Mars's OMF format using "coff2omf library.lib"
    for %i in (*.lib) do coff2omf %i
    
  • delete DM supplied Win32 libraries and header files using this batch file: rm-win32.bat (8 kB - Sun, 05 Jan 2003)
  • finally add the SDK include and library directories to the INCLUDE and LIB environment variables in dm\bin\sc.ini:
    [Environment]
    INCLUDE="%@P%\..\include";"c:\sdk\include";%INCLUDE%
    LIB="%@P%\..\lib";"c:\sdk\lib";%LIB%
    
---------------

This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.

Revision: 1.5, cmeerw.org/prog/dm/ms_sdk.html
Last modified: Mon Sep 03 18:20:50 2018
Christof Meerwald <cmeerw@cmeerw.org>
XMPP: cmeerw@cmeerw.org