From: Marcelo M. <mm...@ac...> - 2005-12-02 00:19:11
|
Also, what python version are you using? Marcelo Pujo Aji wrote: > hello, > > I use the latest version of swig: SWIG-1.3.27. > I think I've posted all of the error report. > > D:\Program\Programming\phyton\swig\swigwin-1.3.27\Examples\python\simplekoe>bcc32 > -c example.c example_wrap.c > Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland > example.c: > Warning W8065 example.c 9: Call to function 'printf' with no prototype > in function hello > Warning W8004 example.c 7: 'i' is assigned a value that is never used > in function hello > example_wrap.c: > Warning W8004 example_wrap.c 428: 'uu' is assigned a value that is > never used in function SWIG_UnpackData > Warning W8004 example_wrap.c 669: 'flags' is assigned a value that is > never used in function PySwigObject_print > Error E2063 example_wrap.c 791: Illegal initialization in function > PySwigObject_type > Warning W8057 example_wrap.c 1452: Parameter 'self' is never used in > function _wrap_hello > Warning W8060 example_wrap.c 1854: Possibly incorrect assignment in > function SWIG_Python_FixMethods > *** 1 errors in Compile *** > > Thanks, > > pujo > > > On 12/1/05, * Marcelo Matus* <mm...@ac... > <mailto:mm...@ac...>> wrote: > > What swig version are you using? > > Could you also send us some code lines around the error/warning > reports? > > thanks, > > Marcelo > > Pujo Aji wrote: > > > Hi, > > > > I tried to follow the example in swig homepage. > > I found error which I don't understand. > > I use bcc32, I already include directory where my python.h exist in > > bcc32.cfg. > > > > /* File : example.c */ > > > > #include <time.h> > > double My_variable = 3.0; > > > > int fact(int n) { > > if (n <= 1) return 1; > > else return n*fact(n-1); > > } > > > > int my_mod(int x, int y) { > > return (x%y); > > } > > > > char *get_time() > > { > > time_t ltime; > > time(<ime); > > return ctime(<ime); > > } > > > > ------------------------- > > /* example.i */ > > %module example > > %{ > > /* Put header files here or function declarations like below */ > > extern double My_variable; > > extern int fact(int n); > > extern int my_mod(int x, int y); > > extern char *get_time(); > > %} > > > > extern double My_variable; > > extern int fact(int n); > > extern int my_mod(int x, int y); > > extern char *get_time(); > > > > ------------------------------------------------------------ > > I write this in my dos console: > > swig -python example.i # this is ok > > bcc32 -c example.c example_wrap.c # this has error > > I found this error: > > Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland > > example.c: > > example_wrap.c: > > Warning W8004 example_wrap.c 428: 'uu' is assigned a value that is > > never used in function SWIG_UnpackData > > Warning W8004 example_wrap.c 669: 'flags' is assigned a value > that is > > never used in function PySwigObject_print > > Error E2063 example_wrap.c 791: Illegal initialization in function > > PySwigObject_type > > Warning W8057 example_wrap.c 1660: Parameter 'self' is never > used in > > function _wrap_fact > > Warning W8057 example_wrap.c 1688: Parameter 'self' is never used in > > function _wrap_my_mod > > Warning W8065 example_wrap.c 1696: Call to function 'get_time' > with no > > prototype in function _wrap_get_time > > Warning W8057 example_wrap.c 1702: Parameter 'self' is never used in > > function _wrap_get_time > > Warning W8060 example_wrap.c 2106: Possibly incorrect assignment in > > function SWIG_Python_FixMethods > > *** 1 errors in Compile *** > > > > How can I solve the problem. > > > > Thanks in advance. > > > > pujo > > > |