LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-10-2004, 03:16 PM   #1
mscollins1
LQ Newbie
 
Registered: Apr 2004
Location: Central California
Distribution: RH, Debian
Posts: 7

Rep: Reputation: 0
KDevelop cannot find QT headers and libraries?!


HELP!

I'm a Linux noob but a Win vet. I love the KDevelop & QT IDE's! I'm having a problem with my #INCLUDE's - KDev won't go to my $QTDIR and find the headers and libraries!

Code frag:

#INCLUDE <iostream>
#INCLUDE "qstring.h"
.
.
int maint()
{
// generic console program, nothing fancy
}

My build process bombs out w/ this message:
main.cpp:28:21: qstring.h: No such file or directory

However, if I do this:
#INCLUDE "/usr/lib/qt-3.3/include/qstring.h"

Then all is well. I know for a fact that this is an issue with the automake/autoconf stuff. However, after spending about 12 hours poring over thousands of lines of scripts and makefiles I've decided to beg for help.

The above program is just a simple "Simple Hello World" project.
(Just went away and tried something else...)

HOLY CRAP!!!!!

I just created a "QMake Project" Hello World and it worked fine! Well, I guess I answered my own question! I'm not ready to tackle automake and autoconf (yet) but I can definitely get stuff done with the tools available.

Okay, if there's an automake/autoconf/make/gmake guru out there who can help me understand this I would be grateful. Besides, a makefile thread ought to be interesting. Anybody else have a makefile horror story?

Thanks,
MC
 
Old 04-10-2004, 04:12 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
when you run gcc (or g++) try adding the switch:
Code:
-I/usr/lib/qt-3.3/include/
so you get:
Code:
g++ myfile.c -o myfile -I/usr/lib/qt-3.3/include
or better still, try using pkg-config to get the lines you need for the include and lib folders:
Code:
g++ myfile.c -o myfile `pkg-config --libs --cflags qt-mt`
those are backticks around the pkg-config line, not apostrophes
 
  


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
Qt headers and libraries not found c-- Ubuntu 12 03-03-2009 07:16 PM
kdevelop unable to recognize headers wasaabi4784 Programming 2 08-16-2005 06:12 PM
QT Libraries & Headers inescapeableus Linux - Software 9 05-03-2005 01:14 AM
./configure problem with apollon on RH 9 -> cannot find QT headers and libraries B1TW1SE Linux - Software 13 10-17-2003 07:31 PM
QT-1.3 (headers and libraries) not found. p_reah Linux - Software 2 04-17-2003 07:11 PM

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

All times are GMT -5. The time now is 03:57 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