Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Including MQTT wrapper for mosquitto library on windows
Forum Updated to NodeBB v4.3 + New Features

Including MQTT wrapper for mosquitto library on windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
mqttlibrarywidgetc++17
22 Posts 4 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dean21
    1 Dec 2023, 11:11

    I just re-added the library, but removed the tickbox for "add d suffix for debug", and that removes the errors about finding -mosquitoppd, but now I have all the same linker errors again.

    S Offline
    S Offline
    starkm42
    wrote on 1 Dec 2023, 11:21 last edited by starkm42 12 Jan 2023, 11:22
    #21

    @Dean21

    for adding a test library called NemaTode, after following the guide https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

    this is what my qmake looks like

    QT       += core gui positioning
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++17
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
        gpssource.cpp \
        main.cpp \
        mainwindow.cpp
    
    HEADERS += \
        gpssource.h \
        mainwindow.h
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../third_party_libs/NemaTode/lib/ -lNemaTode
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../third_party_libs/NemaTode/lib/ -lNemaTode
    else:unix: LIBS += -L$$PWD/../../third_party_libs/NemaTode/lib/ -lNemaTode
    
    INCLUDEPATH += $$PWD/../../third_party_libs/NemaTode/include/nmeaparse
    DEPENDPATH += $$PWD/../../third_party_libs/NemaTode/include/nmeaparse
    
    FORMS += \
        GPSCordinatesDisplay.ui
    

    mine does not have LIB or INCLUDEPATH
    try removing all manual additions, just sticking to the guide would be my suggestion.

    D 1 Reply Last reply 2 Dec 2023, 20:54
    0
    • S starkm42
      1 Dec 2023, 11:21

      @Dean21

      for adding a test library called NemaTode, after following the guide https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

      this is what my qmake looks like

      QT       += core gui positioning
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++17
      
      # You can make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      SOURCES += \
          gpssource.cpp \
          main.cpp \
          mainwindow.cpp
      
      HEADERS += \
          gpssource.h \
          mainwindow.h
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../third_party_libs/NemaTode/lib/ -lNemaTode
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../third_party_libs/NemaTode/lib/ -lNemaTode
      else:unix: LIBS += -L$$PWD/../../third_party_libs/NemaTode/lib/ -lNemaTode
      
      INCLUDEPATH += $$PWD/../../third_party_libs/NemaTode/include/nmeaparse
      DEPENDPATH += $$PWD/../../third_party_libs/NemaTode/include/nmeaparse
      
      FORMS += \
          GPSCordinatesDisplay.ui
      

      mine does not have LIB or INCLUDEPATH
      try removing all manual additions, just sticking to the guide would be my suggestion.

      D Offline
      D Offline
      Dean21
      wrote on 2 Dec 2023, 20:54 last edited by
      #22

      @starkm42 Thanks for the reply, the issue was to do with the fact mosquitto was compiled with a different library. To avoid this I am just going to run a ubuntu VM Thanks everyone for the help.

      1 Reply Last reply
      1

      21/22

      1 Dec 2023, 11:21

      • Login

      • Login or register to search.
      21 out of 22
      • First post
        21/22
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved