Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Linux to Windows cross-compiling error using Qt5 and MinGW
Forum Updated to NodeBB v4.3 + New Features

Linux to Windows cross-compiling error using Qt5 and MinGW

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 3.7k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    dsampaolo
    wrote on last edited by
    #1

    Hello !

    I'm trying to setup Qt5 to build executables for Windows on my Linux computer.
    It looks like my QMAKE_SEP_DIR is messing things up.

    Here are the steps I followed :

    • I installed Qt5 and MinGW, fo r Linux
    • I installed Qt5, Windows version (msvc2010), using Wine
    • I created/copied an mkspec for my build target (win32-x-g++)

    inside my mkspec's qmake.conf , I defined :

    • QMAKE_COPY and such to be DOS-like (I even tried to set QMAKE_SH)
    • the path to my Qt5 include and lib dirs : /home/[myuser]/.wine/drive_c/Qt/Qt5.0.0/5.0.0/msvc2010/include and [blahblah]/lib (files are OK)

    and, last but not least, my QMAKE_DIR_SEP, which seems to be the real issue : if I use / (Linux-wise), make will return an error stating :
    i586-mingw32msvc-g++: /LIBPATH:C:QtQt5.0.05.0.0msvc2010/lib: file not found (look at the path reported!)

    If I change my QMAKE_DIR_SEP to anything like a backslash, then the compiler can't find any Qt include files.

    Am I doing something wrong, or missing something obvious?
    I'm stuck with this for a while, and any help would be really appreciated.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      You can not link object files build with mingw to msvc2010 libraries. I am afraid you will need to build Qt with mingw for this to work.

      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