Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25544

Linking LanguageClient with MinGW fails

    XMLWordPrintable

Details

    • Windows
    • d9cf979d6d1d99051be60aebeb78c28a6251249b (qt-creator/tqtc-qt-creator/master)

    Description

      Since a7fc1631a707e067d3b90d79d6f514096891b20dit fails to link said plugin:

      ld.exe: client.o:client.cpp:(.text+0x12af2): undefined reference to `__imp__ZN22LanguageServerProtocol29WorkDoneProgressCreateRequest10metho
      dNameE'
      ld.exe: client.o:client.cpp:(.text+0x12bec): undefined reference to `__imp__ZN22LanguageServerProtocol20ProgressNotification10methodNameE'
      ld.exe: languageclientmanager.o:languageclientmanager.cpp:(.text+0x45f6): undefined reference to `__imp__ZN22LanguageServerProtocol29WorkDoneProgressCreateRequest10methodNameE'
      ld.exe: languageclientmanager.o:languageclientmanager.cpp:(.text+0x4642): undefined reference to `__imp__ZN22LanguageServerProtocol20ProgressNotification10methodNameE'
      ld.exe: progressmanager.o:progressmanager.cpp:(.text+0x34f): undefined reference to `__imp__ZN22LanguageServerProtocol22WorkDoneProgressReport10messageKeyE'
      ld.exe: progressmanager.o:progressmanager.cpp:(.text+0x3b8): undefined reference to `__imp__ZN22LanguageServerProtocol22WorkDoneProgressReport13percentageKeyE'
      ld.exe: progressmanager.o:progressmanager.cpp:(.text+0x899): undefined reference to `__imp__ZN22LanguageServerProtocol19WorkDoneProgressEnd10messageKeyE'
      ld.exe: progressmanager.o:progressmanager.cpp:(.text+0xbbc): undefined reference to `__imp__ZN22LanguageServerProtocol21WorkDoneProgressBegin8titleKeyE'

      I had the same issue with my own code, constexpr static variables are not exported in the DLL, I had done something like:

      #ifdef Q_OS_WIN
      #    ifdef BUILD_LVS_LIBRARY
      #        define EXPORT_LVS_LIB __declspec(dllexport)
      #    else
      #        define EXPORT_LVS_LIB __declspec(dllimport)
      #    endif
      #     define EXPORT_LVS_LIB_CONSTEXPR __declspec(dllexport)
      #else
      #    ifdef BUILD_LVS_LIBRARY
      #        define EXPORT_LVS_LIB           __attribute((visibility("default"))
      #        define EXPORT_LVS_LIB_CONSTEXPR __attribute((visibility("default"))
      #    else
      #        define EXPORT_LVS_LIB
      #        define EXPORT_LVS_LIB_CONSTEXPR
      #    endif
      #endif
      

      No idea how you want to handle stuff like that, otherwise I had created a change.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            hazardy Björn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes