[kde-cygwin - Help] TuckMeng-Problem Compiling QTDesigner Project

Ralf Habacker ralf.habacker at freenet.de
Fri Mar 12 12:07:06 CET 2004


On Friday 12 March 2004 04:18, SourceForge.net wrote:
> Hi,
>
> I have problems compiling a QTDesigner Project. I did the following
> commands:
> qmake -spec cygwin-g++ -cache /opt/qt/3.2/.qmake.cache -o Makefile
> test1.pro
> followed by:
> make
> The make command failed with the following error:
> g++ -Wl,--disable-runtime-pseudo-reloc -Wl,--export-all-symbols
> -Wl,-rpath,/usr
> /local/lib  -Wl,-rpath,/opt/qt/3.2/lib -o test1 .obj/form4.o
> .obj/moc_form4.o -
> L/usr/local/lib -L/opt/qt/3.2/lib -L/usr/X11R6/lib -lgdi32 -lqt
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lqt
> collect2: ld returned 1 exit status
> make: *** [test1] Error 1
>
> I have cygqt-mt-3.la in /opt/qt/3.2/lib, I see the following line in it:
> library_names=' ../bin/cygqt-mt-3.dll libqt-mt.a'
> I cannot find the file libqt-mt.a though. Wonder if it is stopping me from
> compiling properly. I have tried to replace the -lqt with -L/opt/qt/3.2/lib
> and got a bunch of missing reference errors instead.

At first, make sure you are using the latest qt release, that is qt-3.2.3-3 
(gcc3), because there are some errors fixed found in previous releases. 

From your error description I assume that there are problems with 
your .qmake.cache, which is using the non-threading version of the qt 
library. 
You can verify this by inspecting the CONFIG += line in your .qmake.cache, 
which should contain a term 'thread'. If this term isn't there, qmake creates 
a Makefile refering to the non-threading qt library '-lqt' instead refering 
to the threading version '-lqt-mt'. 

If this doesn't help, you can create a symbolic link in /opt/qt/3.2/lib. 
$ ln -s ../bin/cygqt-mt-3.dll /opt/qt/3.2/lib/libqt.dll.a

If this doesn't work, let me know. 

Ralf 



More information about the kde-cygwin mailing list