Qt-interest Archive, April 2003
HELP PLEASE - Compilation Error -lqt
Message 1 in thread
Hi all!
On last friday I installed the Mandrake 9.0 distribution on my PC. I installed all packages concerning
with developping including KDevelop and QT3.
I have some Red Hat Qt3 programs that I want to continue developing now with the Mandrake ditribution.
After Mandrake installation I set the QTDIR variable to /usr/lib/qt3 and QMAKESPEC to linux-g++,
because Mandrake installation didin't done that.
Then I executed the command line:
qmake -o Makefile myapp.pro
and the Makefile was created.
When I call the make command I receive the following error:
/usr//bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
make: ** [myapp] Error 1
Why is this happening???
PS: The myapp program was created using QT Designer only!!! If I create a QT app using the kdevelop
everything works fine But I want to use only Designer and command line to produce applications.
I dont want to use KDevelop!!
How to solve the -lqt compiler error???
Many thanks...
Alex
Message 2 in thread
Hi all!
On last friday I installed the Mandrake 9.0 distribution on my PC. I installed all packages concerning
with developping including KDevelop and QT3.
I have some Red Hat Qt3 programs that I want to continue developing now with the Mandrake ditribution.
After Mandrake installation I set the QTDIR variable to /usr/lib/qt3 and QMAKESPEC to linux-g++,
because Mandrake installation didin't done that.
Then I executed the command line:
qmake -o Makefile myapp.pro
and the Makefile was created.
When I call the make command I receive the following error:
/usr//bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
make: ** [myapp] Error 1
Why is this happening???
PS: The myapp program was created using QT Designer only!!! If I create a QT app using the kdevelop
everything works fine But I want to use only Designer and command line to produce applications.
I dont want to use KDevelop!!
How to solve the -lqt compiler error???
Many thanks...
Alex
Message 3 in thread
Hi all!
On last friday I installed the Mandrake 9.0 distribution on my PC. I installed all packages concerning
with developping including KDevelop and QT3.
I have some Red Hat Qt3 programs that I want to continue developing now with the Mandrake ditribution.
After Mandrake installation I set the QTDIR variable to /usr/lib/qt3 and QMAKESPEC to linux-g++,
because Mandrake installation didin't done that.
Then I executed the command line:
qmake -o Makefile myapp.pro
and the Makefile was created.
When I call the make command I receive the following error:
/usr//bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
make: ** [myapp] Error 1
Why is this happening???
PS: The myapp program was created using QT Designer only!!! If I create a QT app using the kdevelop
everything works fine But I want to use only Designer and command line to produce applications.
I dont want to use KDevelop!!
How to solve the -lqt compiler error???
Many thanks...
Alex
Message 4 in thread
Alex wrote:
>Hi all!
>
>On last friday I installed the Mandrake 9.0 distribution on my PC. I installed all packages concerning
>with developping including KDevelop and QT3.
>
>I have some Red Hat Qt3 programs that I want to continue developing now with the Mandrake ditribution.
>
>After Mandrake installation I set the QTDIR variable to /usr/lib/qt3 and QMAKESPEC to linux-g++,
>because Mandrake installation didin't done that.
>
>Then I executed the command line:
>
>qmake -o Makefile myapp.pro
>
>and the Makefile was created.
>
>When I call the make command I receive the following error:
>
>/usr//bin/ld: cannot find -lqt
>collect2: ld returned 1 exit status
>make: ** [myapp] Error 1
>
>
>
>Why is this happening???
>
>PS: The myapp program was created using QT Designer only!!! If I create a QT app using the kdevelop
>everything works fine But I want to use only Designer and command line to produce applications.
>I dont want to use KDevelop!!
>
>How to solve the -lqt compiler error???
>
>Many thanks...
>
>Alex
>
>--
>List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>
Take o look in that directory /usr/lib/qt3 to see what library you
have. ( maybe you have compiled with threads )
If so add to your project file CONFIG += thread and recreate the Makefile
--
[ signature omitted ]
Message 5 in thread
Alex,
The first thing I'll mention is that this problem has been hashed and
rehashed, and the solutions are available in the archives. So please search
the archives before you post questions to the list!
That being said, you can solve the problem in a number of ways. But first, an
explanation. Qt3 on Mandrake is precompiled with threads (that is, you have
the "libqt-mt" library instead of the "libqt" library). When qmake generated
your Makefile, it told it to look for the libqt library (this is what it does
by default). So, here are 2 things you can do:
(1) manually edit the Makefile. Somewhere in the Makefile you should have a
line similar to this one:
LIBS=$(SUBLIBS) -L$(QTDIR)/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm
All you have to do is replace the "-lqt" with "-lqt-mt".
(2) In Designer, in the menu go to Project->Project Settings->C++, and under
the "Config" section add the string "thread". This will ensure that each time
you make a Makefile, the appropriate library will be used.
Cheers,
Pete
On Monday 14 Apr 2003 12:18 pm, Alex wrote:
> Hi all!
>
> On last friday I installed the Mandrake 9.0 distribution on my PC. I
> installed all packages concerning with developping including KDevelop and
> QT3.
>
> I have some Red Hat Qt3 programs that I want to continue developing now
> with the Mandrake ditribution.
>
> After Mandrake installation I set the QTDIR variable to /usr/lib/qt3 and
> QMAKESPEC to linux-g++, because Mandrake installation didin't done that.
>
> Then I executed the command line:
>
> qmake -o Makefile myapp.pro
>
> and the Makefile was created.
>
> When I call the make command I receive the following error:
>
> /usr//bin/ld: cannot find -lqt
> collect2: ld returned 1 exit status
> make: ** [myapp] Error 1
>
>
>
> Why is this happening???
>
> PS: The myapp program was created using QT Designer only!!! If I create a
> QT app using the kdevelop everything works fine But I want to use only
> Designer and command line to produce applications. I dont want to use
> KDevelop!!
>
> How to solve the -lqt compiler error???
>
> Many thanks...
>
> Alex
>
> --
> List archive and information: http://lists.trolltech.com/qt-interest/