stonerbot613
7th May 2013, 23:43
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.
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.