Error linking under Windows



  • 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 +=


  • Lifetime Qt Champion

    Hi,

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



  • @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.


  • Lifetime Qt Champion

    What modification did you made ?

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



  • 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.


  • Lifetime Qt Champion

    Do you have copied any generated code like moc files ?



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


  • Lifetime Qt Champion

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



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


  • Lifetime Qt Champion

    What does adbshield_plugin_import.cpp contain ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.