[Qt-interest] #include <QFtp> --- No such file or directory
John McClurkin
jwm at nei.nih.gov
Wed Jan 27 22:43:44 CET 2010
John McClurkin wrote:
> Miguel Cardenas wrote:
>> Hello
>>
>> I am trying to build a very simple ftp client using QFtp but the
>> compiler says
>>
>> error: QFtp: No such file or directory
>>
>> I have this simple .PRO
>>
>> ------------------------------------
>> TEMPLATE = app
>> TARGET = qFtp
>>
>> SOURCES = qFtp.cpp
>>
>> CONFIG += qt network thread warn_on release
>> ------------------------------------
>>
>> Note that I have the network module instaled and QFtp is already there
>>
>> $ find Qt-4.5.1/ -name *QFtp*
>> Qt-4.5.1/include/QtNetwork/QFtp
>>
>> If I do
>>
>> #include <QtNetwork/QFtp>
>>
>> then the program compiles, but the documentation tells to
>>
>> #include <QFtp>
>>
>> but it does not work... Perhaps I need to specify something else on
>> the .PRO file, but currently I have a program that uses QHttp and has
>> nothing special else and it is compiling...
>>
>> Any idea on what is going on?
>>
>> Notes:
>> - I have installation at /usr/local/Trolltech/Qt4-version with link to
>> simply Qt4 and all variables working
>>
>>
>> Thanks for any help!
>>
>>
>> --
>> Miguel Cardenas
>
> You need a line in your .pro file like the following:
> Qt += network
> It is already there... tried both these ways:
>
> -----------------------------------------------------------
> CONFIG += qt network thread warn_on release
> -----------------------------------------------------------
> CONFIG += qt thread warn_on release
> CONFIG += network
> -----------------------------------------------------------
>
> but still QFtp is not found yet... :(
Please reply to the list, not to me personally.
It's there but not correctly. According to my version 4.5.2 of QtAssistant:
> Declaring Qt Libraries
>
> If the CONFIG variable contains the qt value, qmake's support for Qt applications is enabled. This makes it possible to fine-tune which of the Qt modules are used by your application. This is achieved with the QT variable which can be used to declare the required extension modules. For example, we can enable the XML and network modules in the following way:
>
> CONFIG += qt
> QT += network
More information about the Qt-interest-old
mailing list