Qtopia-interest Archive, July 2007
Problems to use QTopia headers file
Message 1 in thread
I am having some problems to compile one test application I am developing. This applications was supposed to give me some alert when the phone receive a SMS.
So I created a app worked on it ...My problems started when I try to compile it.
If I Include the file (#include <qsmsreader.h>)
smstest.h:6:24: error: qsmsreader.h: No such file or directory.
so I try to change the line to (#include <classic/qtopiaphone/qsmsreader.h>)
and I got this error
/opt/Qtopia/SDK/4.2.2/x86/include/classic/qtopiaphone/qsmsreader.h:25:28: error: qcomminterface.h: No such file or directory
/opt/Qtopia/SDK/4.2.2/x86/include/classic/qtopiaphone/qsmsreader.h:26:25: error: qsmsmessage.h: No such file or directory
/opt/Qtopia/SDK/4.2.2/x86/include/classic/qtopiaphone/qsmsreader.h:28: error: invalid function declaration
When I access the qsmsreader.h file I found 2 includes
#include <qcomminterface.h> < -- This File is defined at ./classic/qtopia/qcomminterface.h
#include <qsmsmessage.h>
So I think that is the same error ...
Well, I think that is a problem with the environment variables, but I don't think is a good idea adding all the Qtopia subdirs to include path...
I am using QTopia 4.2.2.
If somebody could help me...
Thanks in advance.
________________________
Alex Pinheiro das Gracas
__
mHave Software, Ltda.
Av. Nossa Senhora dos Navegantes 495, Salas 401 a 404
Enseada do Suá, Vitoria ES
Brazil 29050-420
Phone: +55 27 3327 2039
Skype: mhave.agracas
Web: http://www.mhave.com <http://www.mhave.com/>
Providing outsourcing services and financial enterprise software solutions.


Message 2 in thread
Am 06.07.2007 um 22:00 schrieb Alex Pinheiro das Graças:
> I am having some problems to compile one test application I am
> developing. This applications was supposed to give me some alert
> when the phone receive a SMS.
>
> So I created a app worked on it …My problems started when I try to
> compile it.
>
>
>
> If I Include the file (#include <qsmsreader.h>)
What happens if you do it like in the documentation? From the second
line of http://doc.trolltech.com/qtopia4.2/qsmsreader.html
#include <QSMSReader>
z.
--
[ signature omitted ]
Message 3 in thread
Finally I get to compile and run the program!! I had to change my ".pro" files to add the directories where were the Headers files and library files too.
INCLUDEPATH += $$QPEDIR/include/qtopia
LIBS += -L $$QPEDIR/libs -l qtopiaphone
I didn't know that "qsmsreader.h" was not in the default libraries.
Now I have to do my application give me some alert when new SMS arrives. How to do the qsmsreader object send me a signal when new messages arrives, only to create it like the above example:
MyClass::MyClass{
QSMSReader *_m_object = new QSMSReader(QString(),this);
connect(_m_object,SIGNAL(messageCount(int)),this,SLOT(dosomething(int)));
...
}
Or I need to connect _m_object in other place?
Thanks!