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. Error linking under Windows

Error linking under Windows

Scheduled Pinned Locked Moved General and Desktop
compilelinkstatic
10 Posts 2 Posters 3.2k 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.
  • J Offline
    J Offline
    jocala
    wrote on last edited by
    #1

    I'm working with code that compiles fine under OS X 10.11.1 but fails to link using any version of windows. The full compile log is here: http://pastebin.com/HZr0MT0T

    What I think are the pertinent errors are below:

    undefined reference to `qt_static_plugin_QCocoaIntegrationPlugin()'

    undefined reference to `qt_static_plugin_QSQLiteDriverPlugin()'

    undefined reference to `qt_static_plugin_QCoreWlanEnginePlugin()'

    All I did here was copy my source from OS X to Windows, then in an empty directory run qmake against the ../source/ .pro file, then mingw32-make...something I've done many times w/o problems. My qt build system on Windows has been stable, and I can still compile other sources there w/o errors. My .pro file follows.

    QT += core gui sql network

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = myprogram
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    dialog2.cpp
    helpdialog.cpp
    uninstalldialog.cpp
    preferencesdialog.cpp
    usbfiledialog.cpp
    adblogdialog.cpp
    kodidialog.cpp
    datadialog.cpp
    restdialog.cpp
    backupdialog.cpp
    cachedialog.cpp

    RESOURCES = myprogram.qrc

    HEADERS += mainwindow.h
    dialog2.h
    helpdialog.h
    uninstalldialog.h
    preferencesdialog.h
    usbfiledialog.h
    adblogdialog.h \
    kodidialog.h
    datadialog.h
    restdialog.h
    backupdialog.h
    cachedialog.h

    FORMS += mainwindow.ui
    dialog2.ui
    helpdialog.ui
    uninstalldialog.ui
    preferencesdialog.ui
    usbfiledialog.ui
    adblogdialog.ui
    kodidialog.ui
    datadialog.ui
    restdialog.ui
    backupdialog.ui
    cachedialog.ui

    RC_FILE = myprogram.rc

    ICON =myprogram.icns

    QMAKE_MAC_SDK = macosx10.11

    OTHER_FILES +=

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you have any plugin inclusion in your code not protected by OS specific ifdefs ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you have any plugin inclusion in your code not protected by OS specific ifdefs ?

        J Offline
        J Offline
        jocala
        wrote on last edited by
        #3

        @SGaist No. In fact, this program is a modification of another, with just some UI changes. The original still compiles fine on my three platforms, OS X,Windows, Linux.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What modification did you made ?

          What doesn't make sense is that you have errors on OS X specific static plugins

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jocala
            wrote on last edited by
            #5

            The mods were Ui-related only. Changes to *.ui files, including new text fields, labels, etc. Nothing OS-specific, since I must have portable code across the three platforms. I dunno, if there's nothing obvious that I can try, I may scrap this and go back to my original base code.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Do you have copied any generated code like moc files ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jocala
                wrote on last edited by
                #7

                No, I just move .pro/cpp/ui/h and asset files (all of which are platform-neutral) between platforms :(

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  What if you put the OSX part of your .pro file in a scope ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jocala
                    wrote on last edited by
                    #9

                    AFAIK, the only OSX portion of my .pro file is "QMAKE_MAC_SDK = macosx10.11". I just removed it and the compile errors remain.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      What does adbshield_plugin_import.cpp contain ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      • Login

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