Will a C compiled .so work with a C++ application? -
if want dynamically link shared library (.so) c++ application (which built g++) using ld_preload, matter if .so generated c source file (using gcc) or c++ source file (using g++)? , why or why not?
thanks helping me understand this.
yes, c++ executable can linked (both statically , dynamically) c library.
this deliberate. c++ abis designed backwards compatible.
you have ensure declarations of functions , on of library symbols, written in c++ program, marked extern "c"
denote crossing language boundary. typically, library's own shipped header files you.
Comments
Post a Comment