Reputation: 273
I use Qt 4.6.3 to write application for FriendlyARM. I am trying to pass 2 pointers (pointing to classes axesParam1
and mainWin
) to current class localTime
but get these errors :
localtime.h:17: error: 'axesParam1' has not been declared localtime.h:18: error: 'mainWin' has not been declared localtime.h:26: error: ISO C++ forbids declaration of 'axesParam1' with no type localtime.h:26: error: expected ';' before '*' token localtime.h:27: error: ISO C++ forbids declaration of 'mainWin' with no type localtime.h:27: error: expected ';' before '*' token In file included from trackinputstatus.h:5, from trackinput.h:5, from mainwin.h:8, from geoparam.h:5, from axesparam3.h:5, from axesparam2.h:5, from axesparam1.h:5, from main.cpp:14: trackparamstatus.h:16: error: 'mainWin' has not been declared trackparamstatus.h:24: error: ISO C++ forbids declaration of 'mainWin' with no type trackparamstatus.h:24: error: expected ';' before '*' token main.cpp: In function 'int main(int, char**)': main.cpp:52: error: no matching function for call to 'localTime::setChildren(axesParam1*)' localtime.h:17: note: candidates are: void localTime::setChildren(int*) main.cpp:61: error: no matching function for call to 'localTime::setHome(mainWin*)' localtime.h:18: note: candidates are: void localTime::setHome(int*) main.cpp:62: error: no matching function for call to 'trackParamStatus::setHome(mainWin*)' trackparamstatus.h:16: note: candidates are: void trackParamStatus::setHome(int*)
I did not declared setChildern
to accept int*
as an argument so why is it insisting on int*
?
I have included the header file localtime.h
#ifndef LOCALTIME_H #define LOCALTIME_H #include <QWidget> #include "axesparam1.h" #include "mainwin.h" namespace Ui { class localTime; } class localTime : public QWidget { Q_OBJECT public: localTime(QWidget *parent = 0); ~localTime(); void setChildren(axesParam1 *); void setHome(mainWin *); protected: void changeEvent(QEvent *e); private: Ui::localTime *ui; axesParam1 *P1; mainWin *w; }; #endif // LOCALTIME_H
Upvotes: 0
Views: 722
Reputation: 3989
You look too far down. Before you look at setChildern you should look into axesparam1 and/or mainwin.
localtime.h:17: error: 'axesParam1' has not been declared localtime.h:18: error: 'mainWin' has not been declared
You have some syntex error earlier. setChildern is only some follow-up error.
Upvotes: 0