c++ - MCVC++ Compatibility.
- Ilya Minkov (14/14) Aug 31 2003 Hello.
- Walter (6/20) Aug 31 2003 The DMC++ compiler is compatible for object layout and vtables. It is
- Ilya Minkov (6/10) Sep 02 2003 How? Dig up the calling conventions info and go assembly?
- Walter (17/25) Sep 03 2003 that
Hello. I intend to (try to) write a plug-in for Jeskola BUZZ sound machines system, and i wanted to know whether there's any way to avoid using Microsoft compilers. The Plug-in interface consists out of few functions, which get packaged into a DLL, and simply deliver some objects to the host application. So, it would requiere, that: - an (C++) object from a DLL must have exactly the same format, VTable structure, calling conventions as MSVC code; - the key functions are __fastcall, so a corresponding calling convention must exist. I found the CTG not really clear on these subjects. Thanks beforehand. -eye
Aug 31 2003
The DMC++ compiler is compatible for object layout and vtables. It is compatible with the C++ calling convention, stdcall, and pascal conventions. It does not support the fastcall convention, though you could deal with that by writing a small shim. "Ilya Minkov" <webmaster midiclub.de.vu> wrote in message news:bitu98$2978$1 digitaldaemon.com...Hello. I intend to (try to) write a plug-in for Jeskola BUZZ sound machines system, and i wanted to know whether there's any way to avoid using Microsoft compilers. The Plug-in interface consists out of few functions, which get packaged into a DLL, and simply deliver some objects to the host application. So, it would requiere, that: - an (C++) object from a DLL must have exactly the same format, VTable structure, calling conventions as MSVC code; - the key functions are __fastcall, so a corresponding calling convention must exist. I found the CTG not really clear on these subjects. Thanks beforehand. -eye
Aug 31 2003
Walter wrote:The DMC++ compiler is compatible for object layout and vtables. It is compatible with the C++ calling convention[...]Thanks.It does not support the fastcall convention, though you could deal with that by writing a small shim.How? Dig up the calling conventions info and go assembly? Do you have any pointers handy? Thanks. -eye
Sep 02 2003
"Ilya Minkov" <webmaster midiclub.de.vu> wrote in message news:bj38oi$m1b$1 digitaldaemon.com...Walter wrote:thatThe DMC++ compiler is compatible for object layout and vtables. It is compatible with the C++ calling convention[...]Thanks.It does not support the fastcall convention, though you could deal withA shim would look like this: int __fastcall theirfoo(int a, int b); extern "C" { int __cdecl myfoo(int a, int b) { return theirfoo(a, b); } } It's probably easiest to compile it in MSVC++, since they support the fastcall convention. Otherwise, it'll have to be done with a bit of inline assembler to do the call to theirfoo(). One way to do that is to compile it in MSVC++, disassemble it, and plug the assembler into DMC++'s inline assembler.by writing a small shim.How? Dig up the calling conventions info and go assembly? Do you have any pointers handy?
Sep 03 2003