Hi there, in order to support both C and C++ compilers, it would be nice to add a conditional `extern "C"' wrapper to c_interface.h. While we are at it, we should probably also add the usual guard against multiple inclusion. The standard way to do that is as follows: #ifndef _Yap_c_interface_h #define _Yap_c_interface_h 1 /* __BEGIN_DECLS should be used at the beginning of the C declarations, so that C++ compilers don't mangle their names. __END_DECLS is used at the end of C declarations. */ #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif __BEGIN_DECLS put current contents of c_interface.h here __END_DECLS #endif All the best Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Hi Roberto, Thanks, I've included this in the CVS version and it should be in Yap-4.3.23. Cheers, Vitor
participants (2)
-
Roberto Bagnara -
Vitor Santos Costa