LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-04-2003, 01:38 PM   #1
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Rep: Reputation: 45
makefiles and qt programming


Hi, I'm getting used to making and using makefiles on my own with programming and I've run into a snag when following a QT tutorial, I wonder if anyone can help...

Here's the makefile:

Code:
INCL= -I$(QTDIR)/include -I$(KDEDIR)/include
CFLAGS= -pipe -O2 -fno-strength-reduce
LFLAGS= -L$(QTDIR)/lib -L$(KDEDIR)/lib -L/usr/X11R6/lib
LIBS= -lqt -lX11 -lXext
CC=g++

qtfortune: qtfortune.o
	$(CC) $(LFLAGS) -o qtfortune qtfortune.o $(LIBS)

qtfortune.o: qtfortune.cpp

clean: 
	rm -f qtfortune
	rm -f qtfortune.o

.SUFFIXES: .cpp

.cpp.o:
	$(CC) -c $(CFLAGS) $(INCL) -o $@ $<
I get the following output (error):

/usr/bin/ld: cannot find -lqt
collect: ld returned 1 exit status
make: *** [qtfortune] Error 1

I checked ld.so.conf and it has the qt3 directory (/usr/lib/qt3/lib) already...

The text says something that the LIBS variable is a list of library names the program will need and gives the example that -lqt will be changed into libqt.so...

I've looked everywhere and I can't find libqt.so anywhere...the closest thing I can see is libqt-mt.so.3 or something in the lib directory...

Can anyone point me in the right direction?
 
Old 07-04-2003, 01:44 PM   #2
tcaptain
LQ Addict
 
Registered: Jul 2002
Location: Montreal
Distribution: Gentoo 2004 from stage 1 baby!
Posts: 1,403

Original Poster
Rep: Reputation: 45
Nevermind...I found it.

Google didn't help a whole lot, but a bit of determined digging found this problem in the QT-interest archives at trolltech, so I figure I'd post it in case someone else runs into this.

It seems to be a problem between older qt versions and qt3 (from what I understood anyway) and changing:

-lqt

to:

-lqt-mt

in the makefile fixes the problem and I can compile
 
  


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
makefiles wmoti Programming 5 09-21-2005 03:26 AM
Makefiles deveshs Linux - Software 2 05-02-2005 05:26 AM
Those makefiles... boku Programming 10 03-01-2005 08:19 AM
MAKEFILEs shinpadsmt Linux - Newbie 3 02-21-2004 02:52 AM
Why makefiles parthi4u Programming 4 03-08-2003 03:14 PM

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

All times are GMT -5. The time now is 07:13 AM.

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