From: Georgios P. <pet...@ya...> - 2008-07-10 18:48:34
|
Is it possible that python does not load the dll? I have used %init to add some printf statements, but when doing "import module" in python, I see only the error! Either the dll is not loaded, or the init function not called? George O/H Georgios Petasis ??????: > Dear Gregory, > > -unhideprimitive is not available in python mode :-) > > Regards, > > George > > O/H Gregory Propf ??????: >> Should have read "take out -proxy or try the -unhideprimitive option" >> - Greg >> >> --- On *Thu, 7/10/08, Georgios Petasis /<pe...@ii...>/* >> wrote: >> >> From: Georgios Petasis <pe...@ii...> >> Subject: [Swig-user] Problem with python bindings... >> To: swi...@li... >> Date: Thursday, July 10, 2008, 9:28 AM >> >> Hi all, >> >> I have some C++ code which I use from python for some years now. >> However, there is a problem when I tried to recently recompile my >> extension. When I try to use my module from python, I get: >> >> The error was: python0: Traceback (most recent call last): >> File "<string>", line 1, in <module> >> File "PythonCDM.py", line 60, in >> <module> >> class PySwigIterator(object): >> File "PythonCDM.py", line 64, in PySwigIterator >> __swig_destroy__ = libPythonCDM.delete_PySwigIterator >> >> The swig command I have used to generate the wrapper, is: >> >> swig -Wall -c++ -python -O -proxy -module PythonCDM -interface PythonCDM >> -o PythonCDM_wrap.cxx OCDM.h >> >> I have put the generated files here (both the C++ and the python code): >> http://www.ellogon.org/~petasis/ellogon/PythonCDM_wrap.cxx >> http://www.ellogon.org/~petasis/ellogon/PythonCDM.py >> >> The strange thing is that the function delete_PySwigIterator seems to be >> defined in the C++ code, but somehow is not visible from python. >> Also, this seems to happen under both windows (VC++ 9.0) & linux (fedora >> 9). What can be wrong? >> Swig versions 1.3.35, 1.3.36. >> Maybe anything when compiling the >> code? >> >> Regards, >> >> George >> >> ------------------------------------------------------------------------- >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >> Studies have shown that voting for your favorite open source project, >> along with a healthy diet, reduces your potential for chronic lameness >> and boredom. Vote Now at http://www.sourceforge.net/community/cca08 >> >> _______________________________________________ >> Swig-user mailing list >> Swi...@li... >> https://lists.sourceforge.net/lists/listinfo/swig-user >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >> Studies have shown that voting for your favorite open source project, >> along with a healthy diet, reduces your potential for chronic lameness >> and boredom. Vote Now at http://www.sourceforge.net/community/cca08 >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Swig-user mailing list >> Swi...@li... >> https://lists.sourceforge.net/lists/listinfo/swig-user >> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > ------------------------------------------------------------------------ > > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > |