LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2015, 11:21 AM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Rep: Reputation: 51
Question Strange: Qt 3.3.8 gives "/usr/bin/ld: cannot find -lqt-mt" but library is there


I am trying to install and use Qt 3.3.8 (this version is need, so please don't say to use more recent versions).

Steps I have done:

1. get qt-x11-free-3.3.8.tar.bz2 from http://download.qt.io/archive/qt/3/

2. extract it to /media/PART/path/qt (any folder that is not the suggested /usr/local). I need to do this because I need to have QT installed in a different partition. Should not change anything, I guess. But assume the folder /media/PART/path/qt as the folder where QT is extracted.

3. Configure the environment variable that QT needs to work correctly. File INSTALL gives instructions to follow. We just add the some paths to include QT folders: QTDIR, PATH, MANPATH, LD_LIBRARY_PATH. I have set them in my .bashrc. After opening a new shell I have:

Code:
# echo $PATH; echo $LD_LIBRARY_PATH ; echo $QTDIR ; echo $MANPATH 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/media/PART/path/qt/bin
/media/PART/path/qt/lib
/media/PART/path/qt
/media/PART/path/qt/doc/man
4. I have tried two sets of arguments to configure it. The final error does not change.
4.1. ./configure -qt-gif -shared -thread
4.2. ./configure -qt-gif -static -thread

5. The configure should end without errors. Now we will try to build an example that QT includes:

cd /media/PART/path/qt/examples/aclock
make

It stops with an error:

Code:
$ make
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT \
-I/media/PART/path/qt/mkspecs/linux-g++ -I. \
-I../../include -I.moc/release-static-mt/ -o .obj/release-static-mt/aclock.o \
aclock.cpp

g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT \
-I/media/PART/path/qt/mkspecs/linux-g++ -I. -I../../include \
-I.moc/release-static-mt/ -o .obj/release-static-mt/main.o main.cpp

/media/PART/path/qt/bin/moc aclock.h -o .moc/release-static-mt/moc_aclock.cpp

g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT \
-I/media/PART/path/qt/mkspecs/linux-g++ -I. \
-I../../include -I.moc/release-static-mt/ -o \
.obj/release-static-mt/moc_aclock.o .moc/release-static-mt/moc_aclock.cpp

g++ -Wl,-rpath,/media/PART/path/qt/lib -o aclock \
.obj/release-static-mt/aclock.o .obj/release-static-mt/main.o \
.obj/release-static-mt/moc_aclock.o   -L/media/PART/path/qt/lib \
-L/usr/X11R6/lib -lqt-mt -L/usr/X11R6/lib -lXext -lX11 -lm -ldl -lpthread

/usr/bin/ld: cannot find -lqt-mt

collect2: ld returned 1 exit status

make: ** [aclock] Error 1

$ ls /media/PART/path/qt/lib
libdesignercore.prl      libqnp.prl    libqui.prl
libeditor.prl            libqt-mt.la   qt-mt.pc
libqassistantclient.prl  libqt-mt.prl  README

$ echo $LD_LIBRARY_PATH 

/media/PART/path/qt/lib
Isn't this strange? What am I missing here?

Last edited by dedec0; 12-16-2015 at 11:23 AM.
 
Old 12-16-2015, 11:39 AM   #2
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
I did not 'make' QT... oh, let it be. Make is running now.
 
Old 12-16-2015, 12:42 PM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Error:

Code:
/usr/bin/ld: cannot find -lXext
collect2: ld returned 1 exit status
make[4]: ** [../../../bin/uic] Error 1
Needed to install libxext-dev (2:1.0.99.1) and x11proto-xext-dev (7.0.4-1). Now it continues...
 
Old 12-16-2015, 02:09 PM   #4
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
It ended. No more libraries or packages were needed. Except the awful (IMHO) detail that all examples and the tutorial are compiled by default (and I had to wait for them to compile, just to find out that I did not want to wait for them... LOL), it ended well.

My not even close to updated Ubuntu can install Qt 3.3.8 with just two packages it didn't have. Fairly easy.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Just Curious: why do "/usr/bin/test" and "/usr/bin/[" have different sizes? DaneM Programming 5 01-06-2014 03:33 AM
[SOLVED] Cannot 'find "[" -maxdepth 1 -wholename "/usr/bin/[" ! \( -perm /g+w,o+w \)' standard_output Linux - General 5 09-13-2013 04:23 PM
Error When performing Make: "/usr/bin/ld: cannot find -lpanel" paulmwiu Linux - General 6 08-28-2009 12:28 PM
make issue "/usr/bin/ld: cannot find -ldc1394_control" obaidmushtaq Linux - Software 10 03-21-2009 05:14 AM
/usr/bin/ld: cannot find -lqt, make xconfig tuxandme Linux - Software 5 06-19-2005 01:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration