Dll compatibility between compilers

后端 未结 9 1724
小蘑菇
小蘑菇 2021-01-02 08:35

Is there some way to make c++ dlls built with diffrent compilers compatible with each other? The classes can have factory methods for creation and destruction, so each compi

9条回答
  •  [愿得一人]
    2021-01-02 09:06

    Your problem is maintaining ABI. Though same compiler but different versions you still want to maintain the ABI. COM is one way of solving it. If you really want to understand how COM solves this then check out this article CPP to COM in msdn which describes the essence of COM.

    Apart from COM, there are other (one of the oldest) ways to solve ABI like using Plain old data and opaque pointers. Look at Qt/KDE library developers way of solving ABI.

提交回复
热议问题