我需要使用 MathGL ( mathgl.sourceforge.net ) 在我的 Objective-C 项目中绘制图形,但由于文件 datac_cf.h 和 canvas_cf.h 中的语义问题,我无法编译它,例如:
/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
每次在“双 MGL_EXPORT ...”行上都有 7 个
我使用 cmake 成功编译了 MathGL,并将 Xcode 项目头搜索路径配置为“/usr/local/include”,将库搜索路径配置为“/usr/local/lib”,我还将 libmgl.7.0.0.dylib 拖放到我的项目..
请问我怎样才能摆脱这些语义问题?