[C++-sig] The declaration is unexposed
roman.yakovenko at gmail.com
Fri May 28 10:44:37 CEST 2010
On Fri, May 28, 2010 at 9:12 AM, vishal bayskar
<vishal.bayskar at nechclst.in> wrote:
>>This is the reason why declaration "b" is unexposed. In this case,
>>declarations "b" was declared in a header file, which was not "asked"
>>to be exposed.
> Thanks again Roman for your prompt response.
> Actually my doubt was like pyplusplus exposes declaration from all included
> file that are in current directory (in this particular case a.h file
> includes b.h file that are in the same directory where a.h is)
Your understanding is right, but there are other factors that
influence the selected declarations. As I said, it was a mistake to
implement this "select by default" algorithm.
You can take a look on module_builder_t class.
> In the same example if I provide the absolute path for a.h
> (/home/vishal/a.h) it automatically exposed the class present in b.h file.
This is one of the factors I mentioned earlier.
> Please explain why this happened
Sorry, this days I am really busy and can devote much time to the
project. All critical issues is still address in a day or two, but if
the issue has acceptable work-around - I just propose it.
This is exactly your case. You can "include" all declarations you want
or ... to investigate by yourself :-)
> Actually in my project I am using find_out_dependency(class) function which
> gives list of declaration (on which the class is depending on).
> And after getting the list I am iterating on this list and including all the
> declaration, but I don't know why mysteriously some classes are not getting
> included (and pyplusplus is not even giving any error while including them,
> in my assumption pyplusplus should give some error if some class in not
> getting include).
Wrong, py++ gives you a warning ( may be not in all cases, but it tries hard )
> and at the end I am seeing W1040 warnings that some classes are not getting
> exposed (suppose class myName)
This is exactly the warning. Since py++ allows multi-module
development and integration of user code any where it can't decide
whether "unexposed" declaration is erroneous situation or not.
> I have checked the find_out_dependency() output and it is giving the class
> myName also in the output.
> Please let me know what could be the reason behind it, and what could I do
> to include those class (for example class myName).
I don't know, may be father code excludes it, may be the class is
private, may be bug in py++, may be bug in your
"find_out_dependency-include" loop. I really can't say you.
You will have to investigate this.
C++ Python language binding
More information about the Cplusplus-sig