Sorry.Here's my test.h file

Qt Code:
  1. #ifndef WIDGET_H
  2. #define WIDGET_H
  3. #include <QWidget>
  4.  
  5. using namespace std;
  6. namespace Ui {
  7. class calc;
  8. }
  9.  
  10. class calc : public QWidget {
  11. Q_OBJECT
  12. public:
  13. calc(QWidget *parent = 0);
  14. ~calc();
  15.  
  16.  
  17. protected:
  18.  
  19. private:
  20. Ui::calc *ui;
  21.  
  22. private slots:
  23.  
  24. public slots:
  25. int appendone();
  26. };
  27. #endif // WIDGET_H
To copy to clipboard, switch view to plain text mode 

I created an object for calc in my C++ file
Qt Code:
  1. calc c;
To copy to clipboard, switch view to plain text mode 
Now I'm getting the following error

Qt Code:
  1. /home/anil/Tests/Qt/test/test.cpp:10: undefined reference to `calc::calc(QWidget*)'
  2. /home/anil/Tests/Qt/test/test.cpp:10: undefined reference to `calc::~calc()'
  3. collect2: ld returned 1 exit status
  4. make: *** [test] Error 1
To copy to clipboard, switch view to plain text mode