HSPalm
29th June 2012, 16:20
Hello!
Thank you for having this newbie forum :)
I am trying to add a library/add-on to my project in QT Creator 2.4.1, QtSerialPort (http://qt-project.org/wiki/QtSerialPort).
Actually, I have also tried QSerialDevice (http://qt-apps.org/content/show.php/QSerialDevice?content=112039&PHPSESSID=fcb410664e641afec5d0a355634137ac) (QT 4 based) and QExtSerialPort (http://code.google.com/p/qextserialport/), but haven't had any luck with either... Decided to try full out with QtSerialPort since it's a QT supported ad-on and is still updated.
I don't really know how many errors I have produced trying to do this, so I don't know which to post here. I was kinda hoping someone could clear a couple things up for me before I start posting code and error messages? :confused:
I finally got rid of many error by using MinGW instead of visual studio for compiling (?!). On the QSerialPort page it gives a description for making and adding the DLLs, but this one time I managed to compile it I didn't have no QT 5 folder where it could be output, as stated. But it says to support QT 4? Arrghh, I'm just so frustrated with this. Been sitting here all day and don't even know what questions to ask.
Can I follow the steps in the link (QtSerialPort (http://qt-project.org/wiki/QtSerialPort)) for installing/using this library, and to what extend? I appreciate your answers very much....
Thanks,
Henrik
edit: have calmed down a bit and will no try to do this from scratch while documenting.
1.Starting at http://qt-project.org/wiki/QtSerialPort I download the source code at "Getting the source code: for users" by clicking the "this" link. I extract the contents of the .tar.gz to C:\Qt in a folder called qtplayground-qtserialport (same as tarball).
2. I skip the part about building qt5 from source, jumping straight to the "Building" section (building the library). I open the serialport.pro in Qt Creator, then this pops up:
7912
I don't do any changes in this window and click "finish". Before doing anything I go in the project settings and changing "Qt version" from "Qt 4.8.0 for Desktop - MSVC 2010 (Qt SDK)" to "Qt 4.8.0 for Desktop - MinGW (Qt SDK)".
3. I then press the "build" button (hammer?), and get 336 warnings saying the same thing:
c:\Qt\serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug\.qmake.cache:1: warning: Unmatched quotes are deprecated.
It points to line 1 and 2 in .qmake.cache which consists of two lines:
"SERIALPORT_PROJECT_ROOT = C:/Qt/qtplayground-qtserialport"
"SERIALPORT_BUILD_ROOT = C:/Qt/serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug"
4. I then press the build-button again, having done nothing since getting the 336 warnings, and it builds just fine. Pressing the play/run button gives this in the output dialog:
Starting C:\Qt\serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug\examples\enumerator\debug\en umerator.exe...
The program has unexpectedly finished.
C:\Qt\serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug\examples\enumerator\debug\en umerator.exe exited with code -1073741515
5. Guide now says
After building the module, there will be two library files (Release and Debug builds, respectively) in the Qt5 qtbase binary directory: but I have no such folder. I have also searched my computer for occurrences of these files, with no luck hehe. Where do I go from here?
Thank you for having this newbie forum :)
I am trying to add a library/add-on to my project in QT Creator 2.4.1, QtSerialPort (http://qt-project.org/wiki/QtSerialPort).
Actually, I have also tried QSerialDevice (http://qt-apps.org/content/show.php/QSerialDevice?content=112039&PHPSESSID=fcb410664e641afec5d0a355634137ac) (QT 4 based) and QExtSerialPort (http://code.google.com/p/qextserialport/), but haven't had any luck with either... Decided to try full out with QtSerialPort since it's a QT supported ad-on and is still updated.
I don't really know how many errors I have produced trying to do this, so I don't know which to post here. I was kinda hoping someone could clear a couple things up for me before I start posting code and error messages? :confused:
I finally got rid of many error by using MinGW instead of visual studio for compiling (?!). On the QSerialPort page it gives a description for making and adding the DLLs, but this one time I managed to compile it I didn't have no QT 5 folder where it could be output, as stated. But it says to support QT 4? Arrghh, I'm just so frustrated with this. Been sitting here all day and don't even know what questions to ask.
Can I follow the steps in the link (QtSerialPort (http://qt-project.org/wiki/QtSerialPort)) for installing/using this library, and to what extend? I appreciate your answers very much....
Thanks,
Henrik
edit: have calmed down a bit and will no try to do this from scratch while documenting.
1.Starting at http://qt-project.org/wiki/QtSerialPort I download the source code at "Getting the source code: for users" by clicking the "this" link. I extract the contents of the .tar.gz to C:\Qt in a folder called qtplayground-qtserialport (same as tarball).
2. I skip the part about building qt5 from source, jumping straight to the "Building" section (building the library). I open the serialport.pro in Qt Creator, then this pops up:
7912
I don't do any changes in this window and click "finish". Before doing anything I go in the project settings and changing "Qt version" from "Qt 4.8.0 for Desktop - MSVC 2010 (Qt SDK)" to "Qt 4.8.0 for Desktop - MinGW (Qt SDK)".
3. I then press the "build" button (hammer?), and get 336 warnings saying the same thing:
c:\Qt\serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug\.qmake.cache:1: warning: Unmatched quotes are deprecated.
It points to line 1 and 2 in .qmake.cache which consists of two lines:
"SERIALPORT_PROJECT_ROOT = C:/Qt/qtplayground-qtserialport"
"SERIALPORT_BUILD_ROOT = C:/Qt/serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug"
4. I then press the build-button again, having done nothing since getting the 336 warnings, and it builds just fine. Pressing the play/run button gives this in the output dialog:
Starting C:\Qt\serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug\examples\enumerator\debug\en umerator.exe...
The program has unexpectedly finished.
C:\Qt\serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug\examples\enumerator\debug\en umerator.exe exited with code -1073741515
5. Guide now says
After building the module, there will be two library files (Release and Debug builds, respectively) in the Qt5 qtbase binary directory: but I have no such folder. I have also searched my computer for occurrences of these files, with no luck hehe. Where do I go from here?