oracle / odpi

ODPI-C: Oracle Database Programming Interface for Drivers and Applications
https://oracle.github.io/odpi/
Other
269 stars 78 forks source link

extern "C" {...} for C++ #129

Closed kubo closed 4 years ago

kubo commented 4 years ago

dpi.h must be included as follows in C++ source files to avoid C++ name mangling.

extern "C" {
#include <dpi.h>
}

Could you use this idiom to allow C++ files to include dpi.h without extern "C" {...} as follows?

#include <dpi.h>
anthony-tuininga commented 4 years ago

I've added the changes as requested. Let me know if they work for you. The only question I have is whether someone already added the extern "C" idiom whether this addition will cause their code to fail?

kubo commented 4 years ago

Thanks. It works.

The only question I have is whether someone already added the extern "C" idiom whether this addition will cause their code to fail?

No.