Cross Compiler Communication Library

I need to develop a C ++ front-end using MSVC, which should link to the bank end library that is compiled with C ++ Builder.

How can we define our interfaces so that we don’t run into CRT library problems?

For example, I believe that we cannot safely transfer STL containers back and forth. It's true?

I know that I can safely pass POD types, but I hope I can use even more complex data structures.

+3
source share
3 answers

- ++-. , STL, - . , POD .

STL , STL. STL (, , ), STL .

, , - frieindly. , __cdecl __stdcall , __fastcall , ++ Builder.

"Binary-compatible ++ Interface", , .

  • ( ).
  • - ( __stdcall Windows.
  • DLL.
  • , , , ( -) .. .

, Component Object Model (COM), ++, , .

+4

, C, , POD. POD, C ++, .

, , POD, , , , .. C /.

, COM, CORBA , . , , " ".

++-Builder .

+2

I ran into problems when transferring STL containers even when using the same STL implementation, but set different levels of debugging information, etc. Therefore, Passing PODs will be fine. C ++ containers will almost certainly lead to problems.

+1
source

Source: https://habr.com/ru/post/1768062/


All Articles