C++ – Choice of language for portable library

c++multiplatformportability

I want to write a library which will be dynamically linked from other programs running on modern operating systems like Windows, Linux and OS/X (i.e. it will be deployed as a .dll or .so module).

What is the most appropriate language in that case? Should I stick with plain C? Or is C++ also ok?

Best Solution

You can use either C or C++ for the implementation, but I would recommend to define the interface in pure C. It will be much easier to integrate.