[PyKDE] exported symbols - all or none?
Phil Thompson
phil at riverbankcomputing.co.uk
Tue Apr 26 09:22:31 BST 2005
>
> Hi,
>
> I'm just porting our code from SIP v3 to v4.2.1. So far, very pleasant
> to see how much cleaner the new version is.
>
> One difficultly that I've just hit, however, is where our
> code was linking with the qt sip dlls (for example to access the
> sipForceConvertTo_QSomething functions). I note that none of these
> functions stuff are exported any more unless one exports all symbols.
>
> So for now I'm just hacking the sip code generator, to put
> __declspec(dllexport) in front of the sipType_QSomething definitions.
> I imagine if that works one could platform-generalize it slightly by using
> the Python DL_EXPORT macro instead, or similar. (Given that GCC 4 has
> just gained similar syntax using __attribute__ visibility, that will have
> the potential to cover the principal platforms that [at least] I care
> about).
>
> Is there any better solution that I'm missing here? Or if not, is there
> any
> plan to support a reduced core set of exported symbols from the sip dlls?
Don't do this - it won't work. Modules now build standalone - you do not
link them against modules that are imported.
SIP v4 modules only export one symbol per module, ie. they follow the
rules for modules. You can still refer to things like sipType_QSomething -
those references are resolved through other means and not through the
linker.
Phil
More information about the PyQt
mailing list