DevOrion | 15 Nov 13:01
Favicon

Class as a class datamember


Hi,
I am getting undefined symbol error when i declare class as a data member of
another class.
Here is the interface code

%module Orion
class A;
class B {
    public:
       B(){}
     static const A a;
}

Can somebody help resolve the error or explain correct  way to do it.

Regards,
Dev
--

-- 
View this message in context: http://www.nabble.com/Class-as-a-class-datamember-tp20514803p20514803.html
Sent from the swig-user mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Josh Cherry | 16 Nov 17:55
Favicon

Re: Class as a class datamember


On Sat, 15 Nov 2008, DevOrion wrote:

>
> Hi,
> I am getting undefined symbol error when i declare class as a data member of
> another class.
> Here is the interface code
>
> %module Orion
> class A;
> class B {
>    public:
>       B(){}
>     static const A a;
> }
>
> Can somebody help resolve the error or explain correct  way to do it.

Static data members (other than integers) need to be defined somewhere, 
not just declared.  Have you defined it, and are you linking the 
appropriate object file or library?

Josh

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)


Gmane