Page 2 of 2 FirstFirst 12
Results 21 to 33 of 33

Thread: Protocol Implementation. ?

  1. #21
    Join Date
    Oct 2007
    Location
    Cracow
    Posts
    56
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 10 Times in 10 Posts

    Default Re: Protocol Implementation. ?

    so take it in comments as I have written avbove

  2. #22
    Join Date
    Mar 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: Protocol Implementation. ?

    hey mazurekwrc i tried what you told but i get a error saying
    Qt Code:
    1. 1>LINK : fatal error LNK1181: cannot open input file 'qextserialport.lib'
    To copy to clipboard, switch view to plain text mode 
    So i added the path of the folder where qextserialport is "C:\qextserialport-1.1\qextserialport"
    there is no qextserialport.lib file though.Now when i build the program again i get a new error
    Qt Code:
    1. >LINK : fatal error LNK1181: cannot open input file 'C:\qextserialport-1.1\qextserialport.obj'
    To copy to clipboard, switch view to plain text mode 

    even get a warning
    Qt Code:
    1. 1>.\MessageWindow.cpp(90) : warning C4100: 'event' : unreferenced formal parameter
    To copy to clipboard, switch view to plain text mode 

    Hey i don't find any qextserialport.lib file any where in the qextserialport folder.

  3. #23
    Join Date
    Oct 2007
    Location
    Cracow
    Posts
    56
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 10 Times in 10 Posts

    Default Re: Protocol Implementation. ?

    add
    CONFIG += staticlib
    in qexterialport.pro file, then run qmake, nmake, go to example and run do the same

  4. The following user says thank you to mazurekwrc for this useful post:

    dheeraj (30th April 2008)

  5. #24
    Join Date
    Mar 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: Protocol Implementation. ?

    Hey mazurekwrc Thank you. finally after couple of weeks of breaking head got the output for the example. The GUI was displayed once the example was complied. I need to check if it works fine to send a message from one computer to another.
    And i have a doubt what does the line
    Qt Code:
    1. " CONFIG += staticlib"
    To copy to clipboard, switch view to plain text mode 
    in qexterialport.pro file actually do all the linker errors were removed. ?? Hey and do i need to qmake and nmake all the qexterialport programs in order to work. I am using Qt 4.3.3 integrated with VS2005.net. cause i don't do qmake and nmake for all the other programs which i have been doing all these dazz.

  6. #25
    Join Date
    Oct 2007
    Location
    Cracow
    Posts
    56
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 10 Times in 10 Posts

    Default Re: Protocol Implementation. ?

    here you got about config += staticlib
    http://doc.trolltech.com/4.3/qmake-c...ding-a-library

    you asked also about qmake, it's used to create a platform-specific makefile from the project file, so if we changed .pro file we need to use it, and at the end we use nmake to build program

  7. #26
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Protocol Implementation. ?

    Quote Originally Posted by dheeraj View Post
    Hi wysota
    The first error takes me to this part of the code.
    Qt Code:
    1. void MessageWindow::customEvent(QEvent* event)
    2. {
    3. if (static_cast<MessageWindow::EventType>(event->type()) == MessageWindow::MessageEvent)
    4.  
    5. msgTextEdit.append(dynamic_cast<MessageEvent::MessageEvent* >(event)->msg); // '{ctor}' Error takes me to this line
    6. }
    To copy to clipboard, switch view to plain text mode 

    the second error takes me to this line.
    Qt Code:
    1. QCoreApplication::postEvent(this, new MessageEvent::MessageEvent(qmsg));
    To copy to clipboard, switch view to plain text mode 
    The problem seems to be the dynamic_cast. Maybe your compiler has support for it turned off or you compiled Qt without RTTI support.

  8. #27
    Join Date
    Mar 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: Protocol Implementation. ?

    Hi wysota i think the problem is solved finally. I am able to run the qextserialport examples but with a few warnings. I even tested one example program on RS232 cable connected to two computer and it is working. mazurekwrc asked me to add " CONFIG += staticlib" to .pro file. I did it and finally worked. But i had to comment these two lines
    Qt Code:
    1. msgTextEdit.append(dynamic_cast<MessageEvent::MessageEvent* >(event)->msg);
    2.  
    3. QCoreApplication::postEvent(this, new MessageEvent::MessageEvent(qmsg));
    To copy to clipboard, switch view to plain text mode 
    only then it works . Hey do you have any extra serial communication example. So that i can learn how to send a Frame in a format like i asked in the first post.

    Thank You So much wysota

  9. #28
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Protocol Implementation. ?

    QExtSerialPort gives you access to the serial communication through the QIODevice API, so I suggest you start by taking a look at it.

  10. #29
    Join Date
    Mar 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: Protocol Implementation. ?

    Hi wysota i was able to run all the example programs. I started a new QtApplication Project i wanted to send a string of numbers through serial port on click of a OK button on the GUI form. But i get two linker errors i tried so much but cud't clear the error's pls help me with tthis problem. These are the error's
    Qt Code:
    1. select_spacecraft.obj : error LNK2019: unresolved external symbol "public: __thiscall QextSerialPort::QextSerialPort(class QString const &,enum QextSerialBase::QueryMode)" (??0QextSerialPort@@QAE@ABVQString@@W4QueryMode@QextSerialBase@@@Z) referenced in function "public: __thiscall select_spacecraft::select_spacecraft(class QWidget *)" (??0select_spacecraft@@QAE@PAVQWidget@@@Z)
    2. F:\lpsu_gui 8 RS232\Debug\lpsu_gui.exe : fatal error LNK1120: 1 unresolved externals
    3. Build log was saved at "file://f:\lpsu_gui 8 RS232\lpsu_gui\Debug\BuildLog.htm"
    To copy to clipboard, switch view to plain text mode 

    I have attached the .h and .cpp files also.
    Attached Files Attached Files

  11. #30
    Join Date
    Mar 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: Protocol Implementation. ?

    Hi friends can you pls tell me what is wrong in my program. I am trying to remove those linker errors but not able to clear them.

  12. #31
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Protocol Implementation. ?

    Did you link with the library?

  13. #32
    Join Date
    Mar 2008
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: Protocol Implementation. ?

    Ya i did link every thing but i have this error. !! All the example qextserialport programs
    work perfectly but the one i created has these link error's.


    Thank You

  14. #33
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Protocol Implementation. ?

    Could you show your project file? Does QExtSerialPort contain the constructor mentioned in the error? Also make sure you got the class name right. Is it QextSerialPort or QExtSerialPort?

Similar Threads

  1. Readonly Model implementation requirements for QComboBox
    By DeepDiver in forum Qt Programming
    Replies: 6
    Last Post: 8th November 2007, 17:10
  2. QUdpSocket error
    By mdecandia in forum Qt Programming
    Replies: 8
    Last Post: 25th October 2007, 10:47
  3. UI implementation style
    By goes2bob in forum Qt Tools
    Replies: 2
    Last Post: 15th August 2007, 23:37
  4. RubberBand zoom implementation for images
    By cdemirkir in forum Qt Programming
    Replies: 4
    Last Post: 16th July 2007, 22:55
  5. Qt and Uni-verse Networking Protocol
    By dvmorris in forum Qt Programming
    Replies: 0
    Last Post: 11th April 2007, 09:23

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.