On 12/17/2010 05:05 PM, Hugo Parente Lima wrote:
>> With that change, everything compiles fine. However, when trying to
>> > run the python test script, it fails with an error about an undefined
>> > symbol that said, "ImportError: .../foo.so: undefined symbol:
>> > _Z8init_barP7_object."
>> >
>> > I then went through several failed attempts to compile in the new
>> > bar_wrapper.cpp that the generator also created. As I said, none of
>> > those worked, so I eventually tried again by redoing foo.h as follows:
>>
> Why you can't compile bar_wrapper.cpp!? What errors happened?
>
>
>> > namespace bar {
>> > class Math;
>> > }
>> > class bar::Math : public QObject
>> > {
>> > Q_OBJECT
>> > public:
>> > Math() {}
>> > virtual ~Math() {}
>> > int squared(int x);
>> > };
>> >
>> > With this change along with prefixing the class with "bar::" in the
>> > typesystem.xml file and the resulting file names changes in the
>> > CMakeLists.txt file, everything works as you would expect.
>> >
>> > So, that leads me to my questions again. Why does it work with the
>> > forward declaration syntax but not the inline syntax? My best guess
>> > would be a generator parser limitation based on the warning message.
>> > However, I have not attempted to delve into the code at all.
>>
> We need to known the problems you had trying to compile bar_wrapper.cpp,
> because libfoo uses inline namespaces and works.
>
>
First, thank you for your quick answer.
I then need to offer my apologies. I cannot reproduce this particular
error in the libfoo example. I believe that I may have confused work on
my existing library with the test case because I cannot recreate this
issue in the smaller testing environment. I am checking into it.
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside