#780871 libxdo-dev: Please wrap <xdo.h> in extern "C" guards

Package:
libxdo-dev
Source:
xdotool
Description:
library for simulating X11 keyboard/mouse input
Submitter:
Date:
2015-03-21 03:51:13 UTC
Severity:
normal
#780871#5
Date:
2015-03-20 18:47:52 UTC
From:
To:
Package: libxdo-dev
Version: 1:3.20130111.1-3.1

Hi maintainer,

<xdo.h> isn't directly usable in C++ source files because it doesn't wrap
functions in extern "C" {} when __cplusplus is defined. This means that a
call to, say, xdo_init will resolve to the name-mangled version of the
function, but libxdo.so provides an unmangled name.

It looks like the X headers handle this with the _XFUNCPROTOBEGIN and
_XFUNCPROTOEND headers in <X11/Xfuncproto.h>, which you could use.
Alternatively, you could just conditionally wrap the header in extern "C"
yourself.

Thanks,