From: Heiko G. <hg...@te...> - 2004-02-15 11:31:18
|
On Saturday 14 February 2004 21:40, Danny Smith wrote: > --- Heiko Gerdau <> wrote: > > On Saturday 14 February 2004 00:41, Kuba Ober wrote: > > > > The relevant difference to the GNU Linux link process is the windows > > specific export/import process of symbols. Unfortunately to build Qt > > you have to use the linker switch --export-all-symbols. Without it the > > link time drops dramatically but the linker will also complain about > > unsresolved symbols. I actually do not understand why. In the source > > code every symbol is properly handled with dllexport/dllimport and it > > should work. > > Need some help. I see similar problems with other C++ dlls and am > (slowly) working g to work up patch and testcases. > What kind of symbols do not get marked as dllexport in QT? Typeinfo? > Vtables?. Do headers use pragma interface/pragma implementation? 1) I tried to setup a testcase a year ago but my small examples did never=20 show the problems. If you want to look at the headers youself consider the following test=20 case: //------------ test.cpp ----------------------- #include "qstring.h" int main() { QString qs; qs =3D "Hello World"; } //------------------------------------------------ build with: g++ -I. -I"$(QTDIR)\include" -L. -o test.exe test.cpp qt-mt330.dll results in the attached log with undefined references. But if you try the same example using QCString instead of QString it links= =20 fine. (The qtdll is build without export-all-symbols). You can find the headers "qstring.h" and "qcstring.h" in the free x11=20 edition of Qt330 on www.trolltech.com. They are equal to the ones used on=20 windows but with Q_EXPORT properly defined as (dllexport/dllimport). Some other included files might be not. Anyway maybe it gives some ideas to= =20 setup a test case that shows the problem. 2.) If you compile Qt with the gcc release candidate 3.3.1 you get a lot of= =20 compiler warnings like=20 warning: 'void test(A*)' redeclared without dllimport attribute =A0after being referenced with dllimport linkage." See thread "Dllimport compiler warning with gcc 3.3.1" from Oktober 2003. Maybe this is related to the problem. Greetings Heiko |