24小时热门版块排行榜    

CyRhmU.jpeg
南方科技大学公共卫生及应急管理学院2026级博士研究生招生报考通知(长期有效)
查看: 822  |  回复: 0

sddxwytxfh

金虫 (小有名气)

[求助] 在Ubuntu系统里将C函数包打包成PYTHON

在生理信号处理领域,有一个WFDB软件包,将常见生理信号的滤波等信号处理算法用C(C++)撰写并公开,在业内认可度极高。

该软件包有一个配套的WFDB-SWIG wrappers工具,可以将C函数转换为PYTHON语言,进行调用。

根据安装提示,我用WFDB-SWIG wrappers里面的子文件夹WFDB-PYTHON(该子文件夹专门针对转换为PYTHON)中的make命令,在Ubuntu终端进行,报错了,错误内容如下:
$ make(这是命令,下面的斜体部分是报错内容,比较长)

WFDB_HOME=/usr/local CFLAGS=-I/usr/local/include python setup.py build
running build
running build_py
running build_ext
building '_wfdb' extension
C compiler: i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -I/usr/local/include -fPIC

compile options: '-I/usr/local/include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'
i686-linux-gnu-gcc: wfdb_python_wrap.c
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from wfdb_python_wrap.c:3451:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
  ^
wfdb_python_wrap.c:3457:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int spy_nvsig()
     ^
wfdb_python_wrap.c:3464:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int spy_nsamps()
     ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fname_set’:
wfdb_python_wrap.c:3967:11: error: dereferencing pointer to incomplete type
   if (arg1->fname) free((char*)arg1->fname);
           ^
wfdb_python_wrap.c:3967:36: error: dereferencing pointer to incomplete type
   if (arg1->fname) free((char*)arg1->fname);
                                    ^
wfdb_python_wrap.c:3970:9: error: dereferencing pointer to incomplete type
     arg1->fname = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:3972:9: error: dereferencing pointer to incomplete type
     arg1->fname = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fname_get’:
wfdb_python_wrap.c:3997:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->fname);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_desc_set’:
wfdb_python_wrap.c:4028:11: error: dereferencing pointer to incomplete type
   if (arg1->desc) free((char*)arg1->desc);
           ^
wfdb_python_wrap.c:4028:35: error: dereferencing pointer to incomplete type
   if (arg1->desc) free((char*)arg1->desc);
                                   ^
wfdb_python_wrap.c:4031:9: error: dereferencing pointer to incomplete type
     arg1->desc = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4033:9: error: dereferencing pointer to incomplete type
     arg1->desc = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_desc_get’:
wfdb_python_wrap.c:4058:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->desc);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_units_set’:
wfdb_python_wrap.c:4089:11: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
           ^
wfdb_python_wrap.c:4089:36: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
                                    ^
wfdb_python_wrap.c:4092:9: error: dereferencing pointer to incomplete type
     arg1->units = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4094:9: error: dereferencing pointer to incomplete type
     arg1->units = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_units_get’:
wfdb_python_wrap.c:4119:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->units);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_gain_set’:
wfdb_python_wrap.c:4149:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->gain = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_gain_get’:
wfdb_python_wrap.c:4171:31: error: dereferencing pointer to incomplete type
   result = (WFDB_Gain) ((arg1)->gain);
                               ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_initval_set’:
wfdb_python_wrap.c:4201:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->initval = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_initval_get’:
wfdb_python_wrap.c:4223:33: error: dereferencing pointer to incomplete type
   result = (WFDB_Sample) ((arg1)->initval);
                                 ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_group_set’:
wfdb_python_wrap.c:4253:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->group = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_group_get’:
wfdb_python_wrap.c:4275:32: error: dereferencing pointer to incomplete type
   result = (WFDB_Group) ((arg1)->group);
                                ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fmt_set’:
wfdb_python_wrap.c:4305:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->fmt = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fmt_get’:
wfdb_python_wrap.c:4327:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->fmt);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_spf_set’:
wfdb_python_wrap.c:4357:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->spf = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_spf_get’:
wfdb_python_wrap.c:4379:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->spf);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_bsize_set’:
wfdb_python_wrap.c:4409:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->bsize = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_bsize_get’:
wfdb_python_wrap.c:4431:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->bsize);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adcres_set’:
wfdb_python_wrap.c:4461:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->adcres = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adcres_get’:
wfdb_python_wrap.c:4483:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->adcres);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adczero_set’:
wfdb_python_wrap.c:4513:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->adczero = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adczero_get’:
wfdb_python_wrap.c:4535:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->adczero);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_baseline_set’:
wfdb_python_wrap.c:4565:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->baseline = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_baseline_get’:
wfdb_python_wrap.c:4587:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->baseline);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_nsamp_set’:
wfdb_python_wrap.c:4617:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->nsamp = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_nsamp_get’:
wfdb_python_wrap.c:4639:26: error: dereferencing pointer to incomplete type
   result = (long) ((arg1)->nsamp);
                          ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_cksum_set’:
wfdb_python_wrap.c:4669:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->cksum = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_cksum_get’:
wfdb_python_wrap.c:4691:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->cksum);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Siginfo’:
wfdb_python_wrap.c:4704:52: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Siginfo’
   result = (struct WFDB_Siginfo *)calloc(1, sizeof(struct WFDB_Siginfo));
                                                    ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_low_set’:
wfdb_python_wrap.c:4762:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->low = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_low_get’:
wfdb_python_wrap.c:4784:28: error: dereferencing pointer to incomplete type
   result = (double) ((arg1)->low);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_high_set’:
wfdb_python_wrap.c:4814:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->high = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_high_get’:
wfdb_python_wrap.c:4836:28: error: dereferencing pointer to incomplete type
   result = (double) ((arg1)->high);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_scale_set’:
wfdb_python_wrap.c:4866:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->scale = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_scale_get’:
wfdb_python_wrap.c:4888:28: error: dereferencing pointer to incomplete type
   result = (double) ((arg1)->scale);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_sigtype_set’:
wfdb_python_wrap.c:4919:11: error: dereferencing pointer to incomplete type
   if (arg1->sigtype) free((char*)arg1->sigtype);
           ^
wfdb_python_wrap.c:4919:38: error: dereferencing pointer to incomplete type
   if (arg1->sigtype) free((char*)arg1->sigtype);
                                      ^
wfdb_python_wrap.c:4922:9: error: dereferencing pointer to incomplete type
     arg1->sigtype = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4924:9: error: dereferencing pointer to incomplete type
     arg1->sigtype = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_sigtype_get’:
wfdb_python_wrap.c:4949:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->sigtype);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_units_set’:
wfdb_python_wrap.c:4980:11: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
           ^
wfdb_python_wrap.c:4980:36: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
                                    ^
wfdb_python_wrap.c:4983:9: error: dereferencing pointer to incomplete type
     arg1->units = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4985:9: error: dereferencing pointer to incomplete type
     arg1->units = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_units_get’:
wfdb_python_wrap.c:5010:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->units);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_caltype_set’:
wfdb_python_wrap.c:5040:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->caltype = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_caltype_get’:
wfdb_python_wrap.c:5062:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->caltype);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Calinfo’:
wfdb_python_wrap.c:5075:52: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Calinfo’
   result = (struct WFDB_Calinfo *)calloc(1, sizeof(struct WFDB_Calinfo));
                                                    ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_name_set’:
wfdb_python_wrap.c:5134:11: error: dereferencing pointer to incomplete type
   if (arg1->name) free((char*)arg1->name);
           ^
wfdb_python_wrap.c:5134:35: error: dereferencing pointer to incomplete type
   if (arg1->name) free((char*)arg1->name);
                                   ^
wfdb_python_wrap.c:5137:9: error: dereferencing pointer to incomplete type
     arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:5139:9: error: dereferencing pointer to incomplete type
     arg1->name = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_name_get’:
wfdb_python_wrap.c:5164:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->name);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_stat_set’:
wfdb_python_wrap.c:5194:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->stat = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_stat_get’:
wfdb_python_wrap.c:5216:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->stat);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Anninfo’:
wfdb_python_wrap.c:5229:52: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Anninfo’
   result = (struct WFDB_Anninfo *)calloc(1, sizeof(struct WFDB_Anninfo));
                                                    ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_time_set’:
wfdb_python_wrap.c:5287:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->time = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_time_get’:
wfdb_python_wrap.c:5309:31: error: dereferencing pointer to incomplete type
   result = (WFDB_Time) ((arg1)->time);
                               ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_anntyp_set’:
wfdb_python_wrap.c:5339:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->anntyp = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_anntyp_get’:
wfdb_python_wrap.c:5361:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->anntyp);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_subtyp_set’:
wfdb_python_wrap.c:5391:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->subtyp = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_subtyp_get’:
wfdb_python_wrap.c:5413:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->subtyp);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_chan_set’:
wfdb_python_wrap.c:5443:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->chan = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_chan_get’:
wfdb_python_wrap.c:5465:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->chan);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_num_set’:
wfdb_python_wrap.c:5495:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->num = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_num_get’:
wfdb_python_wrap.c:5517:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->num);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_aux_set’:
wfdb_python_wrap.c:5548:11: error: dereferencing pointer to incomplete type
   if (arg1->aux) free((char*)arg1->aux);
           ^
wfdb_python_wrap.c:5548:34: error: dereferencing pointer to incomplete type
   if (arg1->aux) free((char*)arg1->aux);
                                  ^
wfdb_python_wrap.c:5551:9: error: dereferencing pointer to incomplete type
     arg1->aux = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:5553:9: error: dereferencing pointer to incomplete type
     arg1->aux = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_aux_get’:
wfdb_python_wrap.c:5578:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->aux);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Annotation’:
wfdb_python_wrap.c:5591:55: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Annotation’
   result = (struct WFDB_Annotation *)calloc(1, sizeof(struct WFDB_Annotation));
                                                       ^
In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from wfdb_python_wrap.c:3451:
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
  ^
wfdb_python_wrap.c:3457:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int spy_nvsig()
     ^
wfdb_python_wrap.c:3464:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int spy_nsamps()
     ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fname_set’:
wfdb_python_wrap.c:3967:11: error: dereferencing pointer to incomplete type
   if (arg1->fname) free((char*)arg1->fname);
           ^
wfdb_python_wrap.c:3967:36: error: dereferencing pointer to incomplete type
   if (arg1->fname) free((char*)arg1->fname);
                                    ^
wfdb_python_wrap.c:3970:9: error: dereferencing pointer to incomplete type
     arg1->fname = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:3972:9: error: dereferencing pointer to incomplete type
     arg1->fname = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fname_get’:
wfdb_python_wrap.c:3997:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->fname);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_desc_set’:
wfdb_python_wrap.c:4028:11: error: dereferencing pointer to incomplete type
   if (arg1->desc) free((char*)arg1->desc);
           ^
wfdb_python_wrap.c:4028:35: error: dereferencing pointer to incomplete type
   if (arg1->desc) free((char*)arg1->desc);
                                   ^
wfdb_python_wrap.c:4031:9: error: dereferencing pointer to incomplete type
     arg1->desc = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4033:9: error: dereferencing pointer to incomplete type
     arg1->desc = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_desc_get’:
wfdb_python_wrap.c:4058:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->desc);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_units_set’:
wfdb_python_wrap.c:4089:11: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
           ^
wfdb_python_wrap.c:4089:36: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
                                    ^
wfdb_python_wrap.c:4092:9: error: dereferencing pointer to incomplete type
     arg1->units = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4094:9: error: dereferencing pointer to incomplete type
     arg1->units = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_units_get’:
wfdb_python_wrap.c:4119:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->units);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_gain_set’:
wfdb_python_wrap.c:4149:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->gain = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_gain_get’:
wfdb_python_wrap.c:4171:31: error: dereferencing pointer to incomplete type
   result = (WFDB_Gain) ((arg1)->gain);
                               ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_initval_set’:
wfdb_python_wrap.c:4201:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->initval = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_initval_get’:
wfdb_python_wrap.c:4223:33: error: dereferencing pointer to incomplete type
   result = (WFDB_Sample) ((arg1)->initval);
                                 ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_group_set’:
wfdb_python_wrap.c:4253:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->group = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_group_get’:
wfdb_python_wrap.c:4275:32: error: dereferencing pointer to incomplete type
   result = (WFDB_Group) ((arg1)->group);
                                ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fmt_set’:
wfdb_python_wrap.c:4305:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->fmt = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_fmt_get’:
wfdb_python_wrap.c:4327:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->fmt);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_spf_set’:
wfdb_python_wrap.c:4357:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->spf = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_spf_get’:
wfdb_python_wrap.c:4379:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->spf);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_bsize_set’:
wfdb_python_wrap.c:4409:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->bsize = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_bsize_get’:
wfdb_python_wrap.c:4431:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->bsize);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adcres_set’:
wfdb_python_wrap.c:4461:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->adcres = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adcres_get’:
wfdb_python_wrap.c:4483:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->adcres);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adczero_set’:
wfdb_python_wrap.c:4513:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->adczero = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_adczero_get’:
wfdb_python_wrap.c:4535:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->adczero);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_baseline_set’:
wfdb_python_wrap.c:4565:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->baseline = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_baseline_get’:
wfdb_python_wrap.c:4587:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->baseline);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_nsamp_set’:
wfdb_python_wrap.c:4617:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->nsamp = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_nsamp_get’:
wfdb_python_wrap.c:4639:26: error: dereferencing pointer to incomplete type
   result = (long) ((arg1)->nsamp);
                          ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_cksum_set’:
wfdb_python_wrap.c:4669:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->cksum = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Siginfo_cksum_get’:
wfdb_python_wrap.c:4691:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->cksum);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Siginfo’:
wfdb_python_wrap.c:4704:52: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Siginfo’
   result = (struct WFDB_Siginfo *)calloc(1, sizeof(struct WFDB_Siginfo));
                                                    ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_low_set’:
wfdb_python_wrap.c:4762:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->low = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_low_get’:
wfdb_python_wrap.c:4784:28: error: dereferencing pointer to incomplete type
   result = (double) ((arg1)->low);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_high_set’:
wfdb_python_wrap.c:4814:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->high = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_high_get’:
wfdb_python_wrap.c:4836:28: error: dereferencing pointer to incomplete type
   result = (double) ((arg1)->high);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_scale_set’:
wfdb_python_wrap.c:4866:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->scale = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_scale_get’:
wfdb_python_wrap.c:4888:28: error: dereferencing pointer to incomplete type
   result = (double) ((arg1)->scale);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_sigtype_set’:
wfdb_python_wrap.c:4919:11: error: dereferencing pointer to incomplete type
   if (arg1->sigtype) free((char*)arg1->sigtype);
           ^
wfdb_python_wrap.c:4919:38: error: dereferencing pointer to incomplete type
   if (arg1->sigtype) free((char*)arg1->sigtype);
                                      ^
wfdb_python_wrap.c:4922:9: error: dereferencing pointer to incomplete type
     arg1->sigtype = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4924:9: error: dereferencing pointer to incomplete type
     arg1->sigtype = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_sigtype_get’:
wfdb_python_wrap.c:4949:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->sigtype);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_units_set’:
wfdb_python_wrap.c:4980:11: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
           ^
wfdb_python_wrap.c:4980:36: error: dereferencing pointer to incomplete type
   if (arg1->units) free((char*)arg1->units);
                                    ^
wfdb_python_wrap.c:4983:9: error: dereferencing pointer to incomplete type
     arg1->units = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:4985:9: error: dereferencing pointer to incomplete type
     arg1->units = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_units_get’:
wfdb_python_wrap.c:5010:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->units);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_caltype_set’:
wfdb_python_wrap.c:5040:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->caltype = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Calinfo_caltype_get’:
wfdb_python_wrap.c:5062:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->caltype);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Calinfo’:
wfdb_python_wrap.c:5075:52: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Calinfo’
   result = (struct WFDB_Calinfo *)calloc(1, sizeof(struct WFDB_Calinfo));
                                                    ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_name_set’:
wfdb_python_wrap.c:5134:11: error: dereferencing pointer to incomplete type
   if (arg1->name) free((char*)arg1->name);
           ^
wfdb_python_wrap.c:5134:35: error: dereferencing pointer to incomplete type
   if (arg1->name) free((char*)arg1->name);
                                   ^
wfdb_python_wrap.c:5137:9: error: dereferencing pointer to incomplete type
     arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:5139:9: error: dereferencing pointer to incomplete type
     arg1->name = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_name_get’:
wfdb_python_wrap.c:5164:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->name);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_stat_set’:
wfdb_python_wrap.c:5194:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->stat = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Anninfo_stat_get’:
wfdb_python_wrap.c:5216:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->stat);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Anninfo’:
wfdb_python_wrap.c:5229:52: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Anninfo’
   result = (struct WFDB_Anninfo *)calloc(1, sizeof(struct WFDB_Anninfo));
                                                    ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_time_set’:
wfdb_python_wrap.c:5287:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->time = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_time_get’:
wfdb_python_wrap.c:5309:31: error: dereferencing pointer to incomplete type
   result = (WFDB_Time) ((arg1)->time);
                               ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_anntyp_set’:
wfdb_python_wrap.c:5339:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->anntyp = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_anntyp_get’:
wfdb_python_wrap.c:5361:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->anntyp);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_subtyp_set’:
wfdb_python_wrap.c:5391:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->subtyp = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_subtyp_get’:
wfdb_python_wrap.c:5413:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->subtyp);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_chan_set’:
wfdb_python_wrap.c:5443:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->chan = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_chan_get’:
wfdb_python_wrap.c:5465:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->chan);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_num_set’:
wfdb_python_wrap.c:5495:19: error: dereferencing pointer to incomplete type
   if (arg1) (arg1)->num = arg2;
                   ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_num_get’:
wfdb_python_wrap.c:5517:25: error: dereferencing pointer to incomplete type
   result = (int) ((arg1)->num);
                         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_aux_set’:
wfdb_python_wrap.c:5548:11: error: dereferencing pointer to incomplete type
   if (arg1->aux) free((char*)arg1->aux);
           ^
wfdb_python_wrap.c:5548:34: error: dereferencing pointer to incomplete type
   if (arg1->aux) free((char*)arg1->aux);
                                  ^
wfdb_python_wrap.c:5551:9: error: dereferencing pointer to incomplete type
     arg1->aux = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
         ^
wfdb_python_wrap.c:5553:9: error: dereferencing pointer to incomplete type
     arg1->aux = 0;
         ^
wfdb_python_wrap.c: In function ‘_wrap_WFDB_Annotation_aux_get’:
wfdb_python_wrap.c:5578:28: error: dereferencing pointer to incomplete type
   result = (char *) ((arg1)->aux);
                            ^
wfdb_python_wrap.c: In function ‘_wrap_new_WFDB_Annotation’:
wfdb_python_wrap.c:5591:55: error: invalid application of ‘sizeof’ to incomplete type ‘struct WFDB_Annotation’
   result = (struct WFDB_Annotation *)calloc(1, sizeof(struct WFDB_Annotation));
                                                       ^
error: Command "i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -I/usr/local/include -fPIC -I/usr/local/include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c wfdb_python_wrap.c -o build/temp.linux-i686-2.7/wfdb_python_wrap.o" failed with exit status 1
Makefile:10: recipe for target 'all' failed
make: *** [all] Error 1


新手不太了解C与PYTHON的转换,求大神解释
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 sddxwytxfh 的主题更新
信息提示
请填处理意见