Results 1 to 6 of 6

Thread: error: undefined refrence

  1. #1
    Join Date
    Apr 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default error: undefined refrence

    i have an error in ficgta01 sdk 4.3.2
    header file:
    Qt Code:
    1. #ifndef THIRD_H
    2. #define THIRD_H
    3. #include "ui_third.h"
    4. #include "qcbsmessage.h"
    5. #include <QVariant>
    6. #include <QString>
    7. #include<QWidget>
    8. class third:public QWidget,private Ui_third
    9. {
    10.  
    11. public:
    12. third(QWidget*parent=0,Qt::WFlags f=0);
    13. virtual ~third();
    14. };
    15. #endif
    To copy to clipboard, switch view to plain text mode 
    sourse file :
    Qt Code:
    1. #include "third.h"
    2. #include<QtopiaApplication>
    3. third::third(QWidget*parent,Qt::WFlags f):QWidget(parent,f)
    4. {
    5. setupUi(this);
    6. QCBSMessage *code1=new QCBSMessage();
    7. const uint code=code1->messageCode() ;
    8. QVariant *variant=new QVariant(code);
    9. QString string=variant->toString();
    10. lineEdit->setText(string);
    11. }
    12. third::~third(){}
    To copy to clipboard, switch view to plain text mode 
    error message :
    .obj/debug-shared/third.o: In function `third':
    /home/user/projects/third/third.cpp:6: undefined reference to `QCBSMessage::QCBSMessage()'
    /home/user/projects/third/third.cpp:7: undefined reference to `QCBSMessage::messageCode() const'
    /home/user/projects/third/third.cpp:6: undefined reference to `QCBSMessage::QCBSMessage()'
    /home/user/projects/third/third.cpp:7: undefined reference to `QCBSMessage::messageCode() const'
    collect2: ld returned 1 exit status
    make[1]: *** [third] Error 1
    make[1]: Leaving directory `/home/user/projects/third'
    make: *** [all] Error 2
    please any one tell me what's wrong
    thanks
    Last edited by jpn; 30th April 2009 at 23:54. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: error: undefined refrence

    Please use the [ CODE ] tags for better reading, and try to add
    Qt Code:
    1. #include "qcbsmessage.h"
    To copy to clipboard, switch view to plain text mode 
    also in your source file.

  3. #3
    Join Date
    Apr 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: error: undefined refrence

    third.cpp:
    Qt Code:
    1. #include "third.h"
    2. 1-#include <QCBSMessage>
    3. 2-#include <QAtUtils>
    4. 3-#include <QCBSMessagePrivate>
    5. 4-#include <QSMSMessage>
    6. 5-#include <QtopiaApplication>
    7. 6-third::third(QWidget*parent,Qt::WFlags f):QWidget(parent,f)
    8. 7-{
    9. 8-setupUi(this);
    10. 9-QCBSMessage *code1=new QCBSMessage();
    11. 10-const uint code=code1->messageCode() ;
    12. 11-QVariant *variant=new QVariant(code);
    13. 12-QString string=variant->toString();
    14. 13-lineEdit->setText(string);
    15. 14-}
    16. 15-third::~third(){}
    To copy to clipboard, switch view to plain text mode 
    third.h:
    Qt Code:
    1. #ifndef THIRD_H
    2. 1-#define THIRD_H
    3. 2-#include "ui_third.h"
    4. 3-#include <QVariant>
    5. 4-#include <QString>
    6. 5-#include<QWidget>
    7. 6-#include <QCBSMessage>
    8. 7-#include <QAtUtils>
    9. 8-#include <QCBSMessagePrivate>
    10. 9-#include <QSMSMessage>
    11. 10-#include <QtopiaApplication>
    12. 11-class third:public QWidget,private Ui_third
    13. 12-{
    14. 13-
    15. 14-public:
    16. 15-third(QWidget*parent=0,Qt::WFlags f=0);
    17. 16-virtual ~third();
    18. 17-};
    19. 18-#endif
    To copy to clipboard, switch view to plain text mode 
    Error message:
    Qt Code:
    1. third.h:7:23: error: QCBSMessage: No such file or directory
    2. third.h:8:20: error: QAtUtils: No such file or directory
    3. third.h:9:30: error: QCBSMessagePrivate: No such file or directory
    4. third.h:10:23: error: QSMSMessage: No such file or directory
    5. make[2]: *** [.obj/release-shared/main.o] Error 1
    6. make[2]: Leaving directory `/home/user/projects/third'
    7. make[1]: *** [all] Error 2
    8. make[1]: Leaving directory `/home/user/projects/third'
    9. make: *** [all] Error 2
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Apr 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: error: undefined refrence

    hi
    third.cpp:
    Qt Code:
    1. #include "third.h"
    2. #include "qcbsmessage.h"
    3. #include "qatutils.h"
    4. #include "qatresultparser.h"
    5. #include "qgsmcodec.h"
    6. #include "qsmsmessage.h"
    7. #include <QtopiaApplication>
    8. third::third(QWidget*parent,Qt::WFlags f):QWidget(parent,f)
    9. {
    10. setupUi(this);
    11. QCBSMessage *code1=new QCBSMessage();
    12. const uint code=code1->messageCode() ;
    13. QVariant *variant=new QVariant(code);
    14. QString string=variant->toString();
    15. lineEdit->setText(string);
    16. }
    17. third::~third(){}
    To copy to clipboard, switch view to plain text mode 
    third.h:
    Qt Code:
    1. #ifndef THIRD_H
    2. #define THIRD_H
    3. #include "ui_third.h"
    4. #include <QVariant>
    5. #include <QString>
    6. #include<QWidget>
    7. #include "qcbsmessage.h"
    8. #include "qatutils.h"
    9. #include "qatresultparser.h"
    10. #include "qgsmcodec.h"
    11. #include "qsmsmessage.h"
    12. #include <QtopiaApplication>
    13. class third:public QWidget,private Ui_third
    14. {
    15. public:
    16. third(QWidget*parent=0,Qt::WFlags f=0);
    17. virtual ~third();
    18. };
    19. #endif
    To copy to clipboard, switch view to plain text mode 
    Error message:
    Qt Code:
    1. .obj/release-shared/qcbsmessage.o: In function `QCBSMessage::fromPdu(QByteArray const&)':
    2. qcbsmessage.cpp:(.text+0x354): undefined reference to `QCBSDeliverMessage::QCBSDeliverMessage(QByteAay const&)'
    3. qcbsmessage.cpp:(.text+0x364): undefined reference to `QCBSDeliverMessage::unpack(QTextCodec*)'
    4. qcbsmessage.cpp:(.text+0x36c): undefined reference to `QPDUMessage::~QPDUMessage()'
    5. .obj/release-shared/qcbsmessage.o: In function `QCBSMessage::toPdu() const':
    6. qcbsmessage.cpp:(.text+0x5ec): undefined reference to `QCBSDeliverMessage::QCBSDeliverMessage()'
    7. qcbsmessage.cpp:(.text+0x698): undefined reference to `QCBSDeliverMessage::pack(QCBSMessage const&, MSDataCodingScheme)'
    8. qcbsmessage.cpp:(.text+0x704): undefined reference to `QPDUMessage::~QPDUMessage()'
    9. collect2: ld returned 1 exit status
    10. make[2]: *** [third] Error 1
    11. make[2]: Leaving directory `/home/user/projects/third'
    12. make[1]: *** [all] Error 2
    13. make[1]: Leaving directory `/home/user/projects/third'
    14. make: *** [all] Error 2
    To copy to clipboard, switch view to plain text mode 
    i am sorry but i am confused
    thanks indeed

  5. #5
    Join Date
    Apr 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: error: undefined refrence

    hi
    i want to know what is the wrong in thos program,please

  6. #6
    Join Date
    Apr 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: error: undefined refrence

    i am able to build program well but i have another problem
    when i write sdk -i,h get this error
    Qt Code:
    1. user@qtopiasdk:~/projects/third$ sdk -i
    2. Building /var/www/example_1.0.0-1_i386.qpd
    3. Adding to index: example
    4. Building /var/www/qpe-application_1.0.0-1_i386.qpd
    5. Adding to index: qpe-application
    6. Building /var/www/qpe-first_1.0.0-1_i386.qpd
    7. Adding to index: qpe-first
    8. Building /var/www/qpe-second_1.0.0-1_i386.qpd
    9. Adding to index: qpe-second
    10. Building /var/www/qpe-third_1.0.0-1_arm.qpd
    11. Adding to index: qpe-third
    12. Building /var/www/qpe-third_1.0.0-1_i386.qpd
    13. Adding to index: qpe-third
    14. Install process for qpe-third_1.0.0-1_arm.qpk successfully i nitiated
    15. ssh_exchange_identification: Connection closed by remote host
    To copy to clipboard, switch view to plain text mode 
    please anybody can help me and tell me what is the reason of this error
    i am using qt extended ficgta01 sdk 4.3.2

Similar Threads

  1. Replies: 1
    Last Post: 18th June 2006, 10:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.