Best practices for mixed C and C++ #10106
-
Hello, I'm working on adding DirectWrite support to Pango 2.0. Pango is written in C, but in order to use DirectWrite as of today we are forced to use C++, because DirectWrite headers are incomplete with regards to C interfacing ([1], [2], [3]). I'd like to ask two questions in particular:
With kind regards,
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@eli-schwartz I have a mixed 'c' and 'c++' project, and add all c++ files and c files in the same sources to generate a executable file. Can I Best wishes |
Beta Was this translation helpful? Give feedback.
link_language
kwarg to override this.find_library()
finds the same libraries in either case and C++ shared libraries are technically linkable by the C compiler because they might provide a C ABI (but you can't really know until you try). Depending on your use case, though, you absolutely do need to us…