Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Error linking under Windows

    General and Desktop
    compile link static
    2
    10
    2613
    Loading More Posts
    • 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
      jocala last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • J
          jocala @SGaist last edited by

          @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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • J
              jocala last edited by

              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 Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • J
                  jocala last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    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 Reply Quote 0
                    • J
                      jocala last edited by

                      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 Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        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 Reply Quote 0
                        • First post
                          Last post