Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » how to get compiler to find library?(compiler can not find library )
how to get compiler to find library? [message #1847007] Tue, 12 October 2021 01:57 Go to next message
michael bridges is currently offline michael bridgesFriend
Messages: 5
Registered: September 2021
Junior Member
using eclipse Version: 2018-09 (4.9.0)
on kubuntu 16 (i think)
i have tried usr/include/qt4 and usr/include/qt4/QtGui
usr/include/qt4 did not throw an error in all spots shown, but usr/include/qt4/QtGui caused an error in compiler -> includes -> (`include)

the compiler can not find what i can.
how to get compiler to find library?


//******************* edit *********************
i added qt4 under compiler -> includes -> (`include)
i get:
g++ -std=gnu++11 -std=c++11 -lusr/include/qt4 -Iusr/include/qt4 -includeqt4 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"CComPort.d" -MT"CComPort.o" -o "CComPort.o" "../CComPort.cpp"
cc1plus: fatal error: qt4: No such file or directory

guessing that (`include) is usr/include/

//*******************edit***********************
i commented out #include <QtGui>, and #include <QApplication>, throws the same error.
QApplication is a file in QtGui directory.

what am i doing wrong?

[Updated on: Wed, 13 October 2021 02:34]

Report message to a moderator

Re: how to get compiler to find library? [message #1847087 is a reply to message #1847007] Thu, 14 October 2021 09:28 Go to previous messageGo to next message
David VavraFriend
Messages: 1370
Registered: October 2012
Senior Member
I think you meant /usr/... and not usr/...
The first is relative to the main system directory
while the second is relative to the current directory
which is the Debug directory in your project when building.

It's unlikely the libraries for Qt would be in /usr/include
which is used for header files. The libraries are usually in a
directory beginning /usr/lib... or /usr/local/lib...

Where exactly depends on how you got them.
If you downloaded Qt as a package you may be able to
get the compile and link flags using pkg-config.

All of this is off-topic for this forum. You really should be asking
at a site devoted to Qt or places that cater to programming
questions such as stackoverflow.com
Re: how to get compiler to find library? [message #1847113 is a reply to message #1847087] Fri, 15 October 2021 01:59 Go to previous messageGo to next message
michael bridges is currently offline michael bridgesFriend
Messages: 5
Registered: September 2021
Junior Member
thank you for your help.
the question i have about your reply, how is a programming question with eclipse off topic in an eclipse forum?
Re: how to get compiler to find library? [message #1847115 is a reply to message #1847087] Fri, 15 October 2021 02:07 Go to previous messageGo to next message
michael bridges is currently offline michael bridgesFriend
Messages: 5
Registered: September 2021
Junior Member
David Vavra wrote on Thu, 14 October 2021 09:28
I think you meant /usr/... and not usr/...
The first is relative to the main system directory
while the second is relative to the current directory
which is the Debug directory in your project when building.

It's unlikely the libraries for Qt would be in /usr/include
which is used for header files. The libraries are usually in a
directory beginning /usr/lib... or /usr/local/lib...


ty
ty
ty
ty
ty
that little / was the bug
Re: how to get compiler to find library? [message #1847141 is a reply to message #1847115] Fri, 15 October 2021 16:04 Go to previous message
David VavraFriend
Messages: 1370
Registered: October 2012
Senior Member
Quote:
the question i have about your reply, how is a programming question with eclipse off topic in an eclipse forum


This forum is for dealing with issues caused by Eclipse/CDT or how to set it
up in general (menus to use, etc) such as: How do I get CDT to tell the compiler
where my headers are?
. It's not for fixing your projects. You apparently
already know how to set it up and seem to be asking for details specific
to your project such as Why don't my setting values work?.
Previous Topic:How to control line number width in text editor
Goto Forum:
  


Current Time: Sat Oct 16 10:23:42 GMT 2021

Powered by FUDForum. Page generated in 0.01953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top