Take a look at mangling. If the C ++ library does not export the names "extern C", it becomes interesting in one of three ways, depending on which compiler was used to build the library.
Even then you will not get satisfactory results, since many C ++ concepts will not be handled properly by a program that starts on the C side of the fence. You do not think that a program actually makes any of the indirectly called static C ++ blocks when it does not understand the guarantees of such a βforeignβ language, right?
Short version of the story. Even if you program in C, if you want to properly handle the C ++ library, you need your main C ++ compilation.
Edwin buck
source share