#1351 java incomplete types doesn't obey the rules for other defined types


hi , i am making a java interface of Point cloud library, and i am having a problem with incomplete types (not defined types) ( the marked with SWIG_TYPE_P_)
the problems are:

  • when they are used inside ordinary defined types, they aren't called with their package which results in java compilation error (symbol not found)

we have an incomplete type SWIG_TYPE_P_typename which is defined in wrapper package (using a main package called wrapper when invoking swig)
when this type is used in ordinary type , it will be called SWIG_TYPE_P_typename, but to correct the compilation error , it must be called wrapper.SWIG_TYPE_P_typename , the javac compiler simply doesn't know in which package SWIG_TYPE_P_typename is located into

  • the marcos
    SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)

aren't applyed to java incomplete types (i am expecting this macros to change the access modifiers of the methods of the wrapped types from protect to public, so it can be used in other types that aren't located in the same package)

the below simple project will demonstrate the above 2 bugs (use ./exec.sh to invoke swig and the javac compiler) [I am using ubuntu 12.04 on a virtual box machine]

1 Attachments


  • Remon

    Remon - 2013-12-21

    I am using swig 2.0.4

    Last edit: Remon 2013-12-22
  • William Fulton

    William Fulton - 2014-01-05
    • status: open --> closed
    • Group: -->
  • William Fulton

    William Fulton - 2014-01-05

    SWIG_JAVABODY_TYPEWRAPPER was introduced in swig-2.0.5. Please upgrade. If you can't upgrade, then you should be okay to just copy the macros from a later version of SWIG and use them.


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks