Patch for dcop & win32

Jarosław Staniek js at iidea.pl
Sun Oct 16 23:13:05 CEST 2005


Thiago Macieira said the following, On 2005-10-16 22:42:

> Jarosław Staniek wrote:
> 
>>Non-win32 define for KDEICE_EXPORT could go to kdecore/kdelibs_export.h,
>>right?
> 
> Why? Leave it all in one place. Either in kdelibs_export.h or in 
> KDE-ICE.h, but not both.

Thiago,
My reply was posted too fast:
In fact, _if_ kde-ice lib is very local (only used by libdcop and its test), 
KDEICE_EXPORT can be easily kept in KDE-ICE.h. So right, let's have it only 
there and not in  kdecore/kdelibs_export.h. But we need to have it.

> Let me take the opportunity to understand something about DLLs on Windows: 
> does at least one compiler require you to specify each and every 
> dllimport and dllexport? Isn't there a switch to "export everything 
> defined and import everything not defined"? Or at the very least to 
> "import everything not defined"?

No, otherwise me in 2003 (and previouslu Trolltech in Qt) wouldn't introduce 
*_EXPORT macros. (TT used Q_EXPORT, only one because back then Qt provided 
just one main library -- thus sometimes confused gcc-only people).

GCC introduced it, but it's not a standard. There's no standard for such flags 
and msvc has no support for this. More, as it comes from commercial world, its 
users tend to not export every single their symbol to the world.

> This will impose a serious problem for KDE libraries because:
> a) we have a great deal of them

> b) our developers aren't aware of this need and will therefore use the 
> wrong macros

If this is true, we need to announce this more verbosely. Again, GCC 
introduced visibility for efficiency and to make private interfaces 
_physically_ private, not private "in good faith".

It was introduced in KDElibs 3.4...

> c) bksys will have to define a macro for each target being built, just 
> like MSVC

not sure what does this mean (which macro?), example please?


-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska
  Kexi Developer:
      http://www.kexi-project.org | http://koffice.org/kexi
  KDE3, KDE4 libraries for developing MS Windows applications:
      http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32



More information about the Kde-buildsystem mailing list