I'm building a C program which explicitly dynamically loads DLLs as part of a plugin system. I'm using GCC with Mingw on Windows 7.
What calling convention should the exported functions in the DLLs use, in order to be as robust as possible: run successfully on different Windows machines, survive different compiler versions, etc.
I know that the main executable and the DLLs need only use the same calling convention. How is this normally managed?
Currently I'm only aiming at supporting Windows (even though answers referring also to the same subject on Linux will be welcome as well).