|
From: Chris W. <ch...@qw...> - 2011-06-20 14:23:04
|
Hi Roman, On Mon, 20 Jun 2011, Roman Wieczorek wrote: > I create a dll for an MT4 server, which is compiled with msc, microsoft > compiler. It is not a COM. The system dynamically loads libraries by > LoadLibrary (from windows api). The dll requirements are defined by > single c++ header file with the definitions of exported functions, > structures and classes. If it's a C++ header file then probably it is subject to all kinds of undocumented grey areas in the standard, which means that future versions of Visual Studio might well be incompatible with it, as well as all other C++ compilers (MinGW, Watcom, Borland...) > I have fixed the header for compatibility with name mangling, structure > alignment, and some predefined windows types like __int64. I was really > but surprised but everything worked. Did the mingw developers made > things compatible? Seem so. I guess that given all the effort you had to go to, you probably hit most of the grey areas in the standard. It's hard for any C++ compilers to be more different than CL and GCC are. But there might be gotchas lurking still, like exception handling... > I was not aware about overloading problem. Till I called one of such > methods. Is it possible for you to give the overloaded methods unique names to work around this? (so that they're no longer overloaded) Also, it seems that the application developers, who have tried pretty hard to make this portability possible, might have missed something with the overloading, and they might wish to correct it in future versions, by not using overloading. Cheers, Chris. |