linking still failing in cygwin

Pablo Casado pcasado at absamail.co.za
Wed Oct 20 13:04:21 CEST 2004


Hi,

Nobody responded to my previous post asking for help to link my qt app 
in cygwin so here's a list of a few things I tried hoping it might 
provoke somebody to help me out.

Problem is as follows:
after creating the Makefile with qmake,  I run make, the compiling works 
fine but it fails in the linking:

g++ -Wl,--enable-runtime-pseudo-reloc,--export-all-symbols -o metric 
.obj/main.o
.obj/conversionform.o .obj/moc_conversionform.o  -L/opt/qt/3.2/lib 
-lgdi32 -lwi
nmm -lqt-mt

and the first error (among many) is:

.obj/main.o(.text+0x99):main.cpp: undefined reference to 
`QApplication::QApplica
tion[in-charge](int&, char**)'

In the directory /opt/qt/3.2/lib I have the following files:

cygqt-mt-3.la
libqt-mt.dll -> ../bin/cygqt-mt-3.dll
libqui.dll -> ../bin/cygqui-1.dll

so then I ran impdef  with the intention to create a static .a library

impdef libqt-mt.dll > libqt-mt.def

then I ran dlltool but it was unhappy with the def file.

dlltool -v --dllname libqt-mt.dll --def libqt-mt.def --output-lib 
libqt-mt.a -k

dlltool: Processing def file: libqt-mt.def
dlltool: Syntax error in def file libqt-mt.def:1
dlltool: Processed def file
dlltool: Processing definitions
dlltool: Processed definitions
dlltool: Creating library file: libqt-mt.a
dlltool: run: as   -o dmmeh.o dmmeh.s
dlltool: run: as   -o dmmet.o dmmet.s
dlltool: Created lib file

it still created the lib file libqt-mt.a even, with the error, however 
the linking in my project still fails with the same error.

I hope somebody has any bright ideas for me

Thanks
Pablo.







More information about the kde-cygwin mailing list