KDE_EXPORT question
Andras Mantia
amantia at kde.org
Sat Apr 29 13:38:47 BST 2006
(Send to the list as well. I used a webmail client...)
> Andras Mantia wrote:
>>Hi,
>>
>> I have a question regarding the above define. Why should every library
>>define its own *_EXPORT and not use KDE_EXPORT directly? Is this mandatory?
>
> Because of Windows. On Windows, the LIBRARY_EXPORT macro is defined
either to KDE_EXPORT or to KDE_IMPORT, depending on whether you're
building that library or just using it.
>
> And since you can only build one library at a time, there's at most one
_EXPORT that is defined as KDE_EXPORT. All the rest must be KDE_IMPORT.
>
I
I'm not sure I completely understood, so, the concrete question: what
exactly is needed to export symbols from a KDevelop library? Do I need
there something like
#ifndef _KDEVELOP_EXPORT_H_
#define _KDEVELOP_EXPORT_H_
#include <config.h>
#ifdef __KDE_HAVE_GCC_VISIBILITY
#define LIBKDEVELOP_NO_EXPORT __attribute__ ((visibility("hidden")))
#define LIBKDEVELOP_EXPORT __attribute__ ((visibility("default"))) #else
#define LIBKDEVELOP_NO_EXPORT
#define LIBKDEVELOP_EXPORT
#endif
#endif
and use LIBKDEVELOP_EXPORT in this case or I can safely use KDE_EXPORT?
Andras
--
--
Quanta+ developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
More information about the kde-core-devel
mailing list