LADSoft MSIL Compiler

RSS Feed
The LADSoft MSIL compiler is a variant of Orange C which compiles many C programs to MSIL/.net. It can create either a DLL or an EXE file. It is also possible compile to ILASM source code to see the compiler output.

This compiler will take a list of unmanaged DLLs, and create PINVOKE statements when calls to them are made. However, all such calls must be prototyped, and in general this code will give an error if an unprototyped function is used.

This version of the compiler will import static functions from external assemblies, and enough of the C++ portions of the compiler was enabled to allow one to use them as if they were overloaded functions in C++ namespaces. It also understands __string to mean an MSIL string and can create managed arrays by prefixing the array specifiers instead of postfixing them.

This compiler is capable of compiling either a single source file, or accepting multiple source files and generating a composite EXE or DLL from them.

Two of the larger programs that have been successfully compiled are a modified version of the CC386 compiler and sqlite3 in both DLL and EXE format.

The new DotNetPELib library, written in C++, is used as the interface to generating and loading .NET assemblies


This compiler does not fully support the C language at this time and does not support C++ at all.

An interesting part of this project is the development of an independent C++ library which abstracts the creation of .net assemblies... it is possible to write a few lines of code and have the library generate a complete .net DLL or EXE.


The install below includes the compiler, run time libraries, header files, and many example programs that have been successfully compiled with the compiler. It also includes source code for the C++ library for creation of .net assemblies.

This compiler is hosted on Github.

a CodeProject Article written by Alexandre Bencz discusses this compiler in some depth.

This compiler is released on April 1, 2017 at version 6.0.13.1

ProductMD5 ChecksumSize
Win32 setup package (WIN32 installer) 3a954d7012c394722e7e46ead90576a3 5MB
Executables in zip file format 16b01bdec6df1306d2480fa1b776b242 6MB