[PyKDE] Passing C++-created QWidgets to embedded Python

ian reinhart geiser geiseri at yahoo.com
Tue Apr 16 16:51:23 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 16 April 2002 10:42 am, Phil Thompson wrote:
> Robin Summerhill wrote:
> > I finally worked out what was going wrong here.
> >
> > It's to do with the requirement to mark declarations with
> > __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working
> > properly with MSVC.
> >
> > SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT
> > according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL
> > are defined. Sip.exe uses this declaration to enable sip-generated
> > headers to be used both in building the dll (EXPORT) and the client of
> > the dll (IMPORT). However, the sip-generated headers that are included in
> > the PyQT distribution have been edited to change SIP_EXTERN to
> > SIP_EXPORT, meaning that these headers can only be used to build the
> > libqtc dll, *not* consume it.
> >
> > There is no clean way around this with the present setup, because
> > SIP_EXTERN is used in the SIP headers too. You can't just change
> > SIP_EXPORT back to SIP_EXTERN because that prevents you from building
> > libqtc.
>
> Hopefully fixed in 3.2 - but I haven't tested it. You won't need to
> specify SIP_USE_DLL anymore - things "should just work".
>
> If you are creating a module that %Imports the PyQt .sip files then you
> will now need -DSIP_MAKE_MODULE_DLL in the CXXFLAGS.
Will this work the same if I am includeing other .sip files from other C 
modules I have built?

Also when building a C module that is not based off of PyQt and just SIP will 
I need any special arguments to allow for it to export properly?

- -ian reinhart geiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8vDpjPy62TRm8dvgRAoB8AKCGW7Dm8YZ+ds2OkJEDjtsE4EfLlgCgi8Vi
/aV3kIzvfSGDrysOpfeFD7s=
=7vpf
-----END PGP SIGNATURE-----


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the PyQt mailing list