Question

I need to use MathGL (mathgl.sourceforge.net) for plotting graphs in my Objective-C project but I cant compile it because of semantic issues in files datac_cf.h and canvas_cf.h like:

/usr/local/include/mgl2/datac_cf.h:80:17: 'mgl_datac_get_value' has C-linkage specified, but returns user-defined type 'dual' (aka 'complex<mreal>') which is incompatible with C

/usr/local/include/mgl2/datac_cf.h:206:17: 'mgl_datac_linear' has C-linkage specified, but returns user-defined type 'dual' (aka 'complex<mreal>') which is incompatible with C

/usr/local/include/mgl2/canvas_cf.h:494:17: 'mgl_cexpr_eval' has C-linkage specified, but returns user-defined type 'dual' (aka 'complex<mreal>') which is incompatible with C

there are 7 of them everytime on the "dual MGL_EXPORT ..." line

I have MathGL succesfully compiled using cmake and configured Xcode project header search path to "/usr/local/include" and library search path to "/usr/local/lib", I also dragged and dropped libmgl.7.0.0.dylib to my project..

How can I get rid of these semantic issues please?

No correct solution

OTHER TIPS

I'm using FreeBSD and I have a similar problem. The simplest way to get rid of these warnings is to compile your dependent program with -Wno-return-type or more specifically, with -Wno-return-type-c-linkage flag, which suppresses these warnings.

Other than that, you can patch the headers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top