#835 [python] SWIG generates references to undeclared stuff

python (259)

When building a wrapper with the commandline:
swig -c++ -python -o $(ProjectDir)\$(InputName)_wrap.cxx $(InputPath)

(pretty standard), the generated source makes references to undeclared stuff. More specifically, I get:

error C2039: 'make_output_key_iterator' : is not a member of 'swig'

After inspecting the generated source, the function is declared afterwards, though it *should* be declared before the reference. In fact, SWIG version 1.3.21 did work for that same setup. 1.3.25 doesn't, but for other reasons (still code disorder, but different messages). So for the time I'm sticking with 1.3.21, but you may want to revise how code ordering works (specifically what changed between those versions that could break things this way).

Sorry I can't give you more - I'm not allowed to give you the generated source or the interface files, which I imagine would be a lot of help.


  • Olly Betts

    Olly Betts - 2007-09-18

    Logged In: YES
    Originator: NO

    It seems very likely this is python-specific to me, so marking as such - if it fails similarly for other languages please let us know.

    I appreciate you can't let us have your interface file, but can you cut it down to a much smaller file which still shows the problem which you would be able to let us have? That would make this much easier to solve.

  • Olly Betts

    Olly Betts - 2007-09-18
    • labels: 505206 --> python
    • summary: SWIG generates references to undreclared stuff --> [python] SWIG generates references to undeclared stuff
  • William Fulton

    William Fulton - 2009-11-14
    • assigned_to: beazley --> wsfulton
    • status: open --> closed-rejected
  • William Fulton

    William Fulton - 2009-11-14

    I don't know of any code re-ordering that occurred between those versions. Without some code like a simple cut down example, we can't help. Closing.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks