应用程序中使用纯C

应用程序中使用纯C

I am planning to use pure C MPI library in C++ application, I don't want to add unnecessary bloat by running eg. Boost MPI layer that wraps all stuff in the MPI::<func> classes.Is there anything I should be aware of? 解决方案 You should wrap all your includes for C-headers in an extern "C" block in order to avoid problems with the name mangling of C++ compilers.extern "C" { // include C-headers}Read more here. 这篇关于在C ++应用程序中使用纯C(非类包装)函数时是否有任何问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-31 06:33