Can't link the SmokeQt binding library to Qt-3.0.4-b2/Cygwin

Germain Garand kde-cygwin@mail.kde.org
Fri, 21 Feb 2003 09:47:22 +0000


Hello list,

I'm the maintainer of PerlQt/Smoke bindings to Qt and I'm trying to get t=
hem
up and working under Cygwin...
I'm now up to the point where the Smoke library (/kdebindings/smoke/qt)
 builds fine but links incorrectly (it does link, but the resulting libra=
ry
 looks wrong), and I would like some advices from a Cygwin wizard...

Here is the link step I tried (slightly modified libtool output):

g++-2 -shared -nostdlib [object files here] -L/usr/X11R6/lib \
-L/usr/lib/qt3/lib -L/usr/lib -lqt -lpng -lz -lXext -lX11 -lSM -lICE \
-L/usr/lib/w32api -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-10 -lstdc++-2 =
\
-lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -Wl,-soname\
-Wl,cygsmokeqt-1.dll -Wl,--enable-auto-import -o .libs/libsmokeqt.dll.a

This step runs fine, but when I try to link the resulting dll.a into anot=
her
library, I get strange errors about redefined symbols...

And indeed, it looks like there is a problem :

$ nm libsmokeqt.dll.a | grep __imp___2Qt\$darkYellow
=0910319618=09I=09__imp___2Qt$darkYellow
=0910319618=09I=09__imp___2Qt$darkYellow

Twice the same symbol, with the same pointer !
It looks like most auto-imported symbols have this kind of problem...

So, is it a known problem and is there a workaround?
Am I doing something wrong?

Thanks!

Germain