[Interest] Problem creating a dll that loads static Qt libraries (in mingw) -> final chapter

Thiago Macieira thiago at kde.org
Fri Jan 20 01:20:45 CET 2012


On Thursday, 19 de January de 2012 18.19.37, Till Oliver Knoll wrote:
> First off, the fact that it works with gcc on Linux doesn't give us any
> confirmation whether your code/build instructions/compiler switches are
> correct on Windows! Why? Because that "__declspec(dll_export/import)" stuff
> is very Windows-specific and has no effect on any other platform with
> regards to whether a given symbol is exported from a DLL, or in other
> words: by default (*) on Linux (and any other platform that I know of) ALL
> symbols are exported from a given .so/.dynlib shared library - only on
> Windows you have to explicitly tell which symbols to export.

Count yourself lucky. There is one more such platform, which has taken the 
worst of what Windows had to offer, namely this:

> (Side-note: there is another, I think older mechanism besides the
> "__declspec" approach: to provide an explicit "export table" (*.def ?).
> Refer to the MSDN documentation. But I prefer the __declspec approach, as
> it is "closer tied with the actual code", IMHO easier to maintain.)

That platform is called Symbian.

See 
https://qt.gitorious.org/qt/qt/blobs/master/src/s60installs/bwins/QtCoreu.def 
and 
https://qt.gitorious.org/qt/qt/blobs/master/src/s60installs/eabi/QtCoreu.def 
(and others).

On the other hand, there are certain advantages of doing it the Windows way. 
I've just posted two blogs asking for some of those advantages to be brought 
over to Linux.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120119/299e9318/attachment.sig>


More information about the Interest mailing list