Results 1 to 3 of 3

Thread: Running the enumerator from QextSerialPort

  1. #1

    Default Running the enumerator from QextSerialPort

    Hello I'm trying to get QT to communicate with my arduino board on a serial communications port. My application worked in eclipse but not on QT I did some research and it looks that QextSerialPort project would do the job. I tried running their example enumerator
    Qt Code:
    1. #include <QtCore/QCoreApplication>
    2. #include "qextserialenumerator.h"
    3. #include "stdio.h"
    4.  
    5. using namespace std;
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QCoreApplication a(argc, argv);
    10.  
    11. QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
    12. printf("List of ports:\n");
    13. for (int i = 0; i < ports.size(); i++) {
    14. printf("port name: %s\n", ports.at(i).portName.toLocal8Bit().constData());
    15. printf("friendly name: %s\n", ports.at(i).friendName.toLocal8Bit().constData());
    16. printf("physical name: %s\n", ports.at(i).physName.toLocal8Bit().constData());
    17. printf("enumerator name: %s\n", ports.at(i).enumName.toLocal8Bit().constData());
    18. printf("===================================\n\n");
    19. }
    20. return a.exec();
    21. }
    To copy to clipboard, switch view to plain text mode 

    What I end up getting is "../enumerator.exe exited with code -1073741515". When I try to debug it I get an error "During startup program exited with code 0xc000..."

    after some commenting, it turns out "QextSerialEnumerator::getPorts()" is to blame, because if I comment it out I can debug that program.

    Does anyone have idea why would a call to a function cause such behaviour ?

  2. #2
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Thanks
    101
    Thanked 15 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Running the enumerator from QextSerialPort

    I don't know but the exit code doesn't look healthy. Why do you want to enumerate the ports? You can just configure a fixed port or cycle from 1 through 10 and try to open them.

  3. #3

    Default Re: Running the enumerator from QextSerialPort

    Hey Everyone

    I figured out the problem. It was probably a dependency issue. In the .pro file for creating the qextserialport.dll there is some code:
    Qt Code:
    1. DESTDIR = build
    2. #DESTDIR = examples/enumerator/debug
    3. #DESTDIR = examples/qespta/debug
    4. #DESTDIR = examples/event/debug
    To copy to clipboard, switch view to plain text mode 

    I had to comment the 1st line and comment out the 2nd

Similar Threads

  1. Qextserialport
    By Max123 in forum Qt Programming
    Replies: 3
    Last Post: 27th March 2010, 22:53
  2. New Qextserialport
    By pherthyl in forum Qt Programming
    Replies: 0
    Last Post: 20th August 2009, 01:09
  3. QextSerialPort
    By Diph in forum Newbie
    Replies: 5
    Last Post: 13th September 2008, 19:18
  4. QExtSerialPort
    By baray98 in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2008, 20:46
  5. Replies: 1
    Last Post: 17th May 2006, 00: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.