From: Kurien M. <km...@en...> - 2007-01-31 15:30:32
|
Actually swig has some typemaps/%apply that should map "long long" to "__int64" on windows. eg In windows.i %apply long long { __int64 }; %apply const long long& { const __int64& }; But this did not seem to avoid "long long" in the wrapper code that was generated. Kurien Nitro wrote: > Am 31.01.2007, 15:19 Uhr, schrieb Kurien Mathew <km...@en...>: > >> Hello, >> >> I am a first time user of swig and run into compile problems. My >> environment is as follows >> >> OS: WinXP >> swigwin-1.3.31 with flags '-dump_classes -c++ -python -Idir' >> python 2.4 >> scons build environment >> >> I am trying to generate a C++ dll for use in python >> >> My .i file has: >> %module mmm >> %{ >> // Includes the header in the wrapper code */ >> #include "mmm.h" >> %} >> // Parse the header files >> %include "mmm.h" >> >> >> The generation of the wrapper by swig seems to be ok but the wrapper >> file gives the compiler error >> error C2632: 'long' followed by 'long' is illegal >> >> The first occurence of the error in the wrapper codee is at >> SWIGINTERN int >> SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) >> { >> ..... >> } >> >> I tried doing >> %include <windows.i> >> >> but that did not stop the error. >> >> Could someone please help? > > This looks like you are using an old c++ compiler. From the output I > guess that you are using VC6. This compiler does not support the long > long types. Other ruby users seem to have encountered similar > problems: > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/35852 . I > am not sure, maybe the defualt ruby longlong typemaps should be > adjusted to use the macro which the guy talks about in the mail. |