24小时热门版块排行榜    

查看: 855  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[教师之家] 焦虑 +8 水冰月月野兔 2026-03-13 12/600 2026-03-18 15:27 by 咪呜喵呜
[考研] 311求调剂 +6 26研0 2026-03-15 6/300 2026-03-18 14:43 by haxia
[考研] 311求调剂 +11 冬十三 2026-03-15 12/600 2026-03-18 14:36 by 星空星月
[考研] 265求调剂 +3 梁梁校校 2026-03-17 3/150 2026-03-18 09:12 by zhukairuo
[考研] 268求调剂 +7 好运连绵不绝 2026-03-12 8/400 2026-03-17 20:28 by xilongliang
[考研] 材料与化工求调剂 +6 为学666 2026-03-16 6/300 2026-03-17 20:15 by peike
[硕博家园] 湖北工业大学 生命科学与健康学院-课题组招收2026级食品/生物方向硕士 +3 1喜春8 2026-03-17 5/250 2026-03-17 17:18 by ber川cool子
[考研] 本人考085602 化学工程 专硕 +16 不知道叫什么! 2026-03-15 18/900 2026-03-17 17:05 by ruiyingmiao
[考研] 290求调剂 +3 p asserby. 2026-03-15 4/200 2026-03-17 16:35 by wangkm
[考研] 267一志愿南京工业大学0817化工求调剂 +6 SUICHILD 2026-03-12 6/300 2026-03-17 09:24 by 雾散后相遇lc
[考研] 283求调剂 +3 听风就是雨; 2026-03-16 3/150 2026-03-17 07:41 by 热情沙漠
[考研] 304求调剂 +5 素年祭语 2026-03-15 5/250 2026-03-16 17:00 by 我的船我的海
[考研] 318求调剂 +3 Yanyali 2026-03-15 3/150 2026-03-16 16:41 by houyaoxu
[考研] 283求调剂 +10 小楼。 2026-03-12 14/700 2026-03-16 16:08 by 13811244083
[考研] 一志愿华中师范071000,325求调剂 +6 RuitingC 2026-03-12 6/300 2026-03-16 14:50 by 可淡不可忘
[考研] 0856求调剂 +3 刘梦微 2026-03-15 3/150 2026-03-16 10:00 by houyaoxu
[考研] (081700)化学工程与技术-298分求调剂 +12 11啦啦啦 2026-03-11 35/1750 2026-03-13 21:25 by JourneyLucky
[考研] 材料工程调剂 +4 咪咪空空 2026-03-11 4/200 2026-03-13 19:57 by JourneyLucky
[考研] 求调剂 +3 程雨杭 2026-03-12 3/150 2026-03-13 15:06 by JourneyLucky
[考博] 福州大学杨黄浩课题组招收2026年专业学位博士研究生,2026.03.20截止 +3 Xiangyu_ou 2026-03-12 3/150 2026-03-13 09:36 by duanwu655
信息提示
请填处理意见