Name mangling of c++ classes and its member functions?

后端 未结 4 1133
失恋的感觉
失恋的感觉 2021-01-21 01:15

Is there no way I could avoid name mangling of C++ classes and its member functions when exposed from a c++ dll.

Can\'t I use a def file mechanism in this regard ?

4条回答
  •  难免孤独
    2021-01-21 01:55

    The only way I could think of is declaring functions as extern "C". The name mangling is required for the linker to distinguish e.g. overloaded functions by their parameter list (which would be unavailable to the linker if not for name mangling).

提交回复
热议问题