Results 1 to 3 of 3

Thread: QtSerialPort + Qt 4.8.4 + Statically Compiled App Not Working

  1. #1
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    1

    Default QtSerialPort + Qt 4.8.4 + Statically Compiled App Not Working

    I am developing an application that I'd like to statically compile so that I can distribute just one .exe file to my end users. It requires the use of serial port communication in order to accomplish all necessary tasks.

    I've downloaded QtSerialPort (http://qt-project.org/wiki/QtSerialPort) and gotten it working with no issues on my standard compilation of Qt. However, when I compile the application in my static compilation of Qt (either debug or release mode), the application never runs. QtCreator gives the extremely helpful error "The program has unexpectedly finished."

    I can run other apps under my statically compiled Qt just fine so I don't believe that is the source of the error. It feels like it's a library error dealing with QtSerialPort. I've copied the QtSerialPort libraries (libQtSerialPort.a) and includes into the appropriate locations under the Qt static directory tree. In my .pro project file, I've added the following lines:
    CONFIG += static
    CONFIG += serialport
    LIBS += "C:/qt/qt-4.8.4-build-static/lib/libQtSerialPort.a"
    INCLUDEPATH += "C:/qt/qt-4.8.4-build-static/include/"

    A couple of questions to the group. Is there anything I'm doing wrong? Was QtSerialPort even designed to be compiled statically? If not, is there a way I can 'fudge' things to get it to work?

    Thank you everybody.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtSerialPort + Qt 4.8.4 + Statically Compiled App Not Working

    Quote Originally Posted by stonerbot613 View Post
    I am developing an application that I'd like to statically compile so that I can distribute just one .exe file to my end users. It requires the use of serial port communication in order to accomplish all necessary tasks.

    I've download
    Do you know that if you do that then you must include your object code and/or another way for users to rebuild your app with a different versin of Qt?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QtSerialPort + Qt 4.8.4 + Statically Compiled App Not Working

    Nobody compiled and didn't check library in a static form.

    But I (as developer of library) periodically check library work by its direct connection through serialport-lib.pri the file.
    Thus it is necessary to modify some #include and comment Q_DECL_IMPORT macro, otherwise in the process of
    compilation there will be errors.

    I think that it not a problem in library, a problem somewhere in your appendix therefore it unexpectedly finished.

Similar Threads

  1. Replies: 9
    Last Post: 1st September 2011, 09:07
  2. Qt 4.7.0 statically compiled and Qt Creator
    By Suppaman in forum Installation and Deployment
    Replies: 6
    Last Post: 12th October 2010, 13:47
  3. Statically compiled Qt 4.1.4 and mySql
    By Djony in forum Installation and Deployment
    Replies: 1
    Last Post: 26th January 2007, 08:13
  4. Replies: 3
    Last Post: 26th July 2006, 14:23
  5. Qt is compiled statically, now what ?
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 30th May 2006, 13:46

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.