How can you stick with a library written in , with a program written in ?

In turn, I have an idea for describing an interface for working with objects, but I have no idea about linking. There are thoughts only about the dynamic loading of the library.

  • one
    No special action is required, is it not? Only in headers you need not forget at the beginning of #ifdef __cplusplus extern "C" { #endif and at the end of #ifdef __cplusplus } #endif . - HolyBlackCat
  • one
    So: stackoverflow.com/questions/14917952/… ? - Alexander Prokoshev

1 answer 1

This can be done only by developing a C-interface for your library, i.e. a set of interface functions that do not use the specific properties of the C ++ language and are declared extern "C" .

In the general case, the development of such an interface is not a trivial task.

  • It turned out right, and I thought I would have to dance with a tambourine =) - LLENN