Results 1 to 1 of 1

Thread: [SOLVED] Mingw32 on Linux - ld error

  1. #1

    Default [SOLVED] Mingw32 on Linux - ld error

    Hi guys,

    I'm currently trying to compile a small Qt app on Linux for Windows.
    I'm running ArchLinux and installed a static mingw32-qt4. I ran into a few problems, but most of them I solved via searching the web and/or this forum here. I have the following options (beside the normal stuff) set in my pro-file:
    Qt Code:
    1. QMAKE_CXX = /usr/bin/i486-mingw32-g++
    2.  
    3. QMAKE_INCDIR = /usr/i486-mingw32/include
    4. QMAKE_INCDIR_QT = /usr/i486-mingw32/include/qt4
    5. QMAKE_LIBDIR_QT = /usr/i486-mingw32/lib/qt4/
    6.  
    7. QMAKE_MOC = /usr/i486-mingw32/lib/qt4/bin/moc
    To copy to clipboard, switch view to plain text mode 

    Running i486-mingw32-qmake produces the right Makefile, and the following make also runs smoothly - well, almost. Right at the end, it gives me the following error:
    Qt Code:
    1. /usr/lib/gcc/i486-mingw32/4.7.2/../../../../i486-mingw32/bin/ld: cannot find -lQtGui
    2. /usr/lib/gcc/i486-mingw32/4.7.2/../../../../i486-mingw32/bin/ld: cannot find -lQtCore
    To copy to clipboard, switch view to plain text mode 


    Is it possible to tell ld where to look for the include files? I already had to add the couple lines to the pro-file to tell make where to look, is there something similar for ld? So far, I haven't found way to do this (or what else to do)...

    Many thanks for every hint and tip!

    huilui


    Edit:
    I also tried adding to the pro-file:
    Qt Code:
    1. QMAKE_LIBDIR += /usr/i486-mingw32/lib/qt4/
    To copy to clipboard, switch view to plain text mode 
    but that didn't do anything either...


    Added after 38 minutes:


    Okay, I was close: Adding
    Qt Code:
    1. QMAKE_LIBDIR += /usr/i486-mingw32/lib/
    To copy to clipboard, switch view to plain text mode 
    does the trick. It now compiles on Linux and runs perfectly on Windows.
    Last edited by huilui; 27th August 2013 at 01:41.

Similar Threads

  1. mingw32-make[2]: *** [..\..\lib\QtCored4.dll] Error 1
    By jivanr in forum Installation and Deployment
    Replies: 5
    Last Post: 20th October 2012, 12:04
  2. error while compiling qtbase with mingw32-make
    By ottoshmidt in forum Installation and Deployment
    Replies: 2
    Last Post: 9th September 2011, 16:24
  3. Solution to qtbase (5.0) build error with mingw32-make
    By ottoshmidt in forum Installation and Deployment
    Replies: 0
    Last Post: 2nd September 2011, 22:07
  4. Error building MySQL pluggin on xp with mingw32-make
    By weziw in forum Installation and Deployment
    Replies: 4
    Last Post: 26th March 2008, 14:36
  5. mingw32-make : multiple target patterns error
    By tsemer in forum Installation and Deployment
    Replies: 2
    Last Post: 6th November 2007, 14:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.