24小时热门版块排行榜    

查看: 916  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[论文投稿] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 jRl3mE6ddZGq 2026-08-03 4/200 2026-08-04 04:54 by k7OM8YghWbkC
[论文投稿] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 jRl3mE6ddZGq 2026-08-03 7/350 2026-08-04 04:50 by k7OM8YghWbkC
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 jRl3mE6ddZGq 2026-08-03 6/300 2026-08-04 04:47 by k7OM8YghWbkC
[找工作] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 8/400 2026-08-04 04:47 by k7OM8YghWbkC
[公派出国] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 7/350 2026-08-04 04:46 by k7OM8YghWbkC
[博后之家] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 8/400 2026-08-04 04:46 by k7OM8YghWbkC
[考博] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 cu9Nq1xK233Z 2026-08-03 5/250 2026-08-04 04:44 by k7OM8YghWbkC
[教师之家] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +4 cu9Nq1xK233Z 2026-08-03 8/400 2026-08-04 04:41 by k7OM8YghWbkC
[有机交流] 一个有机合成实验室都需要哪些设备? 50+3 kf2781974 2026-07-31 9/450 2026-08-04 03:56 by kf2781974
[教师之家] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 jRl3mE6ddZGq 2026-08-03 7/350 2026-08-04 03:35 by k7OM8YghWbkC
[考研] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 cu9Nq1xK233Z 2026-08-03 8/400 2026-08-04 03:21 by k7OM8YghWbkC
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 cu9Nq1xK233Z 2026-08-03 12/600 2026-08-04 03:17 by k7OM8YghWbkC
[基金申请] 什么时候能放榜呀? +3 Jacob678 2026-08-03 3/150 2026-08-03 16:14 by gltch
[高分子] UV压敏胶开发 +3 ichall 2026-07-30 5/250 2026-08-03 14:40 by Sunrisepay
[基金申请] 面上提前没消息,有中的吗 +14 archvillain 2026-08-02 16/800 2026-08-03 12:23 by fuweiguochen
[基金申请] 面上再次挂了,太难了,躺也躺不了,倦也卷不过,小学校之殇! +19 低垂的野花 2026-07-31 25/1250 2026-08-03 09:25 by gy116024
[基金申请] 2026年国自然面上资助率 +16 布布和一二 2026-07-30 22/1100 2026-08-03 09:20 by gy116024
[教师之家] 基础研究怎么拉横向,学校到款任务越来越多,难以完成 拉横向,都有哪些途径啊 +8 锦衣卫寒战 2026-07-28 12/600 2026-08-03 08:22 by syl200707
[基金申请] 微信指数没变化,科研之友没阅读 +15 wangze12014 2026-07-28 19/950 2026-08-02 20:05 by 蔡棒棒菂
[基金申请] 你们的时间戳变了吗 +3 archvillain 2026-07-30 4/200 2026-07-30 18:53 by levinzhwen
信息提示
请填处理意见