What compiler to use for writing DLLs

 
As background to this question, see http://stackoverflow.com/questions/4993114/c-compiler-on-oracle-virtual-box-running-xp-guest-on-linux-host. The program, which is not specifically mentioned by name in the given link, is MetaTrader 4, so I would like to know what compiler was used to compile MetaTrader 4 so that I can install the correct compiler for writing DLLs.
 

I have only tested to write dll's. and i used DEV-C++ (Bloodshed).


but with dev-c++ you'll have to write exportnames in code, havnt got *.def files to work properly.


ie:

//-----------------------------------------------------------------------------
// For unmangling export names
#ifdef __cplusplus 
extern "C" {
#endif
    void EALOG_WriteLine(char *);
#ifdef __cplusplus
}
#endif
 
babelproof:
As background to this question, see http://stackoverflow.com/questions/4993114/c-compiler-on-oracle-virtual-box-running-xp-guest-on-linux-host. The program, which is not specifically mentioned by name in the given link, is MetaTrader 4, so I would like to know what compiler was used to compile MetaTrader 4 so that I can install the correct compiler for writing DLLs.

It has nothing to do with the compiler they used. Any compiler will do as long as it can produce a DLL which exports its functions as stdcall. I recommend FPC (Free Pascal), its much easier than C++ to get your function exports correct, you won't have all these name mangling problems and there is extensive documentation for making MT4 DLLs with FPC: http://www.forexfactory.com/showthread.php?t=219576

Reason: