Issue 41620

Summary: vcl/source/gdi/animate.cxx: definition of dllimport static data member not allowed
Product: porting Reporter: pavel
Component: codeAssignee: dirk.voelzke
Status: CLOSED NOT_AN_OOO_ISSUE QA Contact: issues@porting <issues>
Severity: Trivial    
Priority: P1 (highest) CC: issues, ruediger.timm
Version: current   
Target Milestone: ---   
Hardware: All   
OS: Windows Server 2003   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description pavel 2005-01-30 07:33:41 UTC
Hi,

while compiling module vcl with .NET2003:

e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(101) :
warning C4273: 'mnAnimCount' : inconsistent dll linkage
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(101) :
error C2491: 'Animation::mnAnimCount' : definition of dllimport static data
member not allowed
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(108) :
warning C4273: 'AnimationBitmap::GetChecksum' : inconsistent dll linkage
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(140) :
warning C4273: 'Animation::Animation' : inconsistent dll linkage
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(156) :
warning C4273: 'Animation::Animation' : inconsistent dll linkage
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(179) :
warning C4273: 'Animation::~Animation' : inconsistent dll linkage
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\animate.cxx(197) :
warning C4273: 'Animation::operator`='' : inconsistent dll linkage

Only the second one is error. But the amount of "inconsistent dll linkage" is
also alarming and applies to many files in module vcl.

The same is in opengl.cxx:

e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\opengl.cxx(392) :
warning C4273: 'mbNoOGL' : inconsistent dll linkage
e:\home\pavel\BuildDir\ooo_SRC680_m75_src\vcl\source\gdi\opengl.cxx(392) : error
C2491: 'OpenGL::mbNoOGL' : definition of dllimport static data member not allowed

These two are the only statics declared in inc/* (I removed comments there):

pavel@linux:~/.ooo/ooo_SRC680_m75_src/vcl> grep static inc/*|grep -v "("
inc/animate.hxx:        SAL_DLLPRIVATE static ULONG                     mnAnimCount;
inc/opengl.hxx: static BOOL     mbNoOGL;
Comment 1 pavel 2005-01-30 07:56:04 UTC
Invalid. This is because of my changes I made for GNU/Linux (see #i41591#).
Build works correctly without that change, so I have to apply the KDE workaround
only on Linux ;-)

Sorry for the noise.
Comment 2 dirk.voelzke 2005-02-09 10:08:46 UTC
closed