Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-78546

Cannot run Modbus RTU examples with static Qt build on Windows

    XMLWordPrintable

Details

    • Windows
    • 80144b89ca1adede0db9d6e485037f5e431216c3 (qt/qtserialbus/5.13) e993a7f1f24303b4b1274b8b0d5e747bc00b9dce (qt/qtserialbus/5.12)

    Description

      I've configured Qt 5.14 and Qt dev branch with the following line (reduced):

      configure -developer-build -opensource -confirm-license -qtnamespace Qt5 -static
      

      Build went fine but when I run the Modbus master example trying to connect to COM1 the connecting cannot be established and the following error message gets issued:

      qt.modbus: (RTU server) QSerialPort error: QSerialPort::OpenError "Cannot load library pcanbasic: The specified module could not be found."
      

      This seems to happen because Canbus and Serialport define both a function called:

      inline bool resolveSymbols(QLibrary *pcanLibrary) // peakcan_symbols_p.h
      {
          ....
      }
      
      and
      
      inline bool resolveSymbols(QLibrary *ntLibrary) // qtntdll_p.h
      {
          ....
      }
      

      Since both are equal probably the wrong one is chosen while resolving the symbol and the wrong code gets executed. I'm suggesting putting both implementation into a module private namespace or to simply rename the function to not that generic.

      Issue was introduced with commit a0faf986fccdce1d36f3308dc520cdac001f5264

      Attachments

        For Gerrit Dashboard: QTBUG-78546
        # Subject Branch Project Status CR V

        Activity

          People

            aha_1980 André Hartmann
            heimrich Karsten Heimrich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes