Results 1 to 15 of 15

Thread: Adding QtSerialPort as a library -

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Adding QtSerialPort as a library -

    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.
    Actually, I have also tried QSerialDevice (QT 4 based) and 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?

    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) 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:
    Attachment 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:
    Qt Code:
    1. "SERIALPORT_PROJECT_ROOT = C:/Qt/qtplayground-qtserialport"
    2. "SERIALPORT_BUILD_ROOT = C:/Qt/serialport-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug"
    To copy to clipboard, switch view to plain text mode 

    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?
    Attached Images Attached Images

Similar Threads

  1. cannot build qtserialport
    By banlinhtienphong in forum Qt Programming
    Replies: 1
    Last Post: 16th December 2011, 05:56
  2. Adding glew library
    By Cucus in forum Newbie
    Replies: 3
    Last Post: 20th June 2011, 22:44
  3. Adding library in another project
    By Anshuman in forum Qt Programming
    Replies: 1
    Last Post: 26th April 2011, 16:13
  4. Adding an external Library
    By afflictedd2 in forum Qt Programming
    Replies: 1
    Last Post: 13th December 2008, 05:51

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.