<table cellspacing='0' cellpadding='0' border='0' ><tr><td valign='top' style='font: inherit;'>Thanks Andreas.<br><br>YOur right I did not do the export, I never suspected it as qmake was working just fine and I did not have to do a&nbsp; export with it.&nbsp; A bit of a hassle to go back and add this, to all my classes, wish KDE didn't use gcc vixibility feature.&nbsp; I am sure they have a reason for implementing it.&nbsp; <br><br>Thanks gain for your help.&nbsp; This should be on the FAQ if it isn't already there.<br><br>David<br><br>--- On <b>Wed, 7/30/08, Andreas Pakulat <i>&lt;apaku@gmx.de&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Andreas Pakulat &lt;apaku@gmx.de&gt;<br>Subject: Re: [CMake] Building shared libraries for KDE app<br>To: cmake@cmake.org<br>Date: Wednesday, July 30, 2008, 11:24 PM<br><br><pre>On 30.07.08 22:49:25, David Boosalis wrote:<br>&gt; I have
 had no trouble using cmake to build kde executables, but have been<br>unable to use it successfully to build a shared library that my kde application<br>uses.&nbsp; <br>&gt; <br>&gt; The library builds fine but it is missing all the symbols from my source<br>files.&nbsp; When I use qmake to build the library it all works the symobls are all<br>there and everything works fine.<br><br>This usually means you didn't export any of your symbols. KDE uses<br>gcc's<br>visibility feature to export only those symbols that are part of the<br>public API. For that to work you need something like the following in a<br>header:<br><br>#ifndef INTERFACESEXPORT_H<br>#define INTERFACESEXPORT_H<br><br>/* needed for KDE_EXPORT macros */<br>#include &lt;kdemacros.h&gt;<br><br>#ifndef KDEVPLATFORMINTERFACES_EXPORT<br># ifdef MAKE_KDEVPLATFORMINTERFACES_LIB<br>#  define KDEVPLATFORMINTERFACES_EXPORT KDE_EXPORT<br># else<br>#  define KDEVPLATFORMINTERFACES_EXPORT
 KDE_IMPORT<br># endif<br>#endif<br><br>#endif<br><br>And then prefix any class you want to export with (in this example)<br>KDEVPLATFORMINTERFACES_EXPORT (after "class").<br><br>CMake sets the MAKE_KDEVPLATFORMINTERFACES_LIB define when building the<br>library (the general form is MAKE_&lt;targetname&gt;_LIB) and then KDE_EXPORT<br>is automtaically set to the right export definition depending on your<br>platform. KDE_IMPORT is only interesting on windows, it basically tells<br>the compiler to import the symbols of that library into the app where<br>they're used.<br><br>Unfortunately I don't know if there's a tutorial for this, but if there<br>is its probably on techbase.kde.org.<br><br>Andreas<br><br>-- <br>Expect a letter from a friend who will ask a favor of you.<br>_______________________________________________<br>CMake mailing list<br>CMake@cmake.org<br>http://www.cmake.org/mailman/listinfo/cmake</pre></blockquote></td></tr></table>