error: definition of static data member '%s' of dllimport'd class

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

 



Hello!
I am ported some code from VC6 under gcc
and using actually gcc 3.3.1 (minGW-build 08-04-2003)
under Win32
Idea this code to hide Implement's from header file
for cross-platforms compatibility

but I  see some strange problem under gcc:
------------------------------------
error: definition of static data member '
VariablesImpl Variables::m_Impl' of dllimport'd class.
for follows code:
----------------header fail---------------------
class _SHARED_PLATFORM_EXPORT VariablesImpl;

class _SHARED_PLATFORM_EXPORT Variables
{
public:
static MyString GetEnvVariable(const MyString strName);
static void SetEnvVariable(const MyString strName, const MyString strValue);

private:
static VariablesImpl m_Impl;
};
---------------cpp fail----------------------
class _SHARED_PLATFORM_EXPORT VariablesImpl
{
public:
................
private:
................
}

// create a global instance of the container

VariablesImpl Variables::m_Impl;

-----------------------------------------
Can somebody get any suggestion - why
produced this error ? I NOT import's at this point
any api or something

Thank's
Aleksei


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux