Re: Windows Compilation Madness



Gary Wright wrote:

Unlink Linux (and *BSD, Mac OS X...), Windows does not come packaged
with a development environment and in fact there are multiple
mutually-incompatible development environments (Cygwin, MinGW, VC6,
VC8). For the most part you can not mix-and-match object code (dlls)
created by these different environments with the biggest problem being
that there is no common memory allocation library.

I assume this is why some Windows software comes distributed with its
own collection of 'standard' dlls compiled in the same development
environment as the underlying application.

DLLs is a Windows standard file format (pretty much like an executable
file with an exported table of names) and can most often be used between
compilers. The thing that I think differ the most in DLLs is how C++
classes are represented, here the different compilers have different
incompatible solutions. Another thing that can differ is stack calling
conventions, but the Windows SDK has a couple of predefined function
prefixes that are compatible across compilers.

Normally, you use an implib tool from your Windows compiler to create a
small lib file that maps to the DLL and are linked statically to your
application. Since DLLs are dynamic, they can be replaced with later
versions as long as the required exported names are still there.


Best regards,

Jari Williamsson

.



Relevant Pages

  • Re: Windows Compilation Madness
    ... For the most part you can not mix-and-match object code (dlls) ... Confirmed that Windows does not come with a dev environment. ... development environment as the underlying application. ... package DLLs simply version them as new compiler versions come out so ...
    (comp.lang.ruby)
  • Re: Toolchains, was: Re: 8051 on-chip debugging
    ... compilers were Windows based only. ... supporting Linux as a development environment. ... I do note that the product seems to be built on top of gcc and Eclipse ...
    (comp.arch.embedded)
  • Re: Windows Compilation Madness
    ... object code (dlls) created by these different environments with the ... compiler, although, IIRC, that compiles to the CLR. ... development environment as the underlying application. ...
    (comp.lang.ruby)
  • Re: "Process terminated by SIGINT"?
    ... how do I use the LIB to access the DLL's functions, ... For DLLs that are supposed to be used by multiple compilers, it is good practice to use OS/2 system calling convention because every OS/2 compiler needs to support that. ...
    (comp.os.os2.programmer.misc)
  • Re: passing using "string" type in DLL Interface
    ... You need two DLLs anyway if you use the typical debug/release scenario. ... those use different heaps and you must not allocate ... The problem with the compilers isn't too big. ... VC6-VC8, C#, VB and whatnot. ...
    (microsoft.public.vc.stl)