[CWB] cl.h and C++

Yannick Versley yversley at gmail.com
Tue Mar 13 15:34:00 CET 2012


I was trying to use cl.h (respectively, the Cython code that uses it)
together with another module that is written in C++ and there is a
problem because C++ includes the functions from cl.h but mangles
their names (thinking that they are C++ functions and not C ones).
This can be easily fixed by putting a
#ifdef __cplusplus
extern "C" {

and a

#ifdef __cplusplus

around the function declarations in cl.h, which would allow C++ code
to use the C-level API for CWB.

I'll probably have to make do with a workaround for now (which is easy
enough), but maybe it would be useful for the benefit of future generations

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20120313/9003f25a/attachment.htm

More information about the CWB mailing list