c++classdllexport

Loading classes from DLL that was exported by another compiler


I have to explain my team why exporting classes from DLL is not good solution, if we plan to use that DLL from different compiler. But I can't find prove for that. Is there something in standart like "compiler shouldn't supply backward compatibility, also different compilers can implement their own style of naming exporting symbols, so exported class from DLL can be used then just by same compiler"? I know it is true, but how can I prove that? Also, if you know additional arguments for me, please, help!


Solution

  • Here are a few points that you may find interesting/useful to tell your team.

    A more complete explanation is given here, from where I shamelessly copied the above. Seeing as you use MinGW, this should be very relevant.

    Also, if you haven't done so already, take a look at the discussion for this SO question.