help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static data members in shared objects


From: Suneeel
Subject: Static data members in shared objects
Date: 21 Apr 2006 02:13:10 -0700
User-agent: G2/0.2

Hi all,

I'm having a problem with a shared object i've written. I have a class
with a couple of private static data members.
The class declaration is in a .h file and the member function
definitions are in a .cpp file.

I'm compiling the shared object with -fPIC and -shared.

The code compiles fine, but when I try to use the shared object, I get
a linker error saying  undefined reference to `CSomeClass::m_SomeVar'
where m_SomeVar is the private static member.
The same is hapning for the other static memver variables as well.

Is there some issue with using static data members in shared objects ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]