4

I recently used this guide to cross compile a program for Windows on Linux: Building Qt 5 on Linux, for Windows

However when I compile the program, the executable file that is created is broken and does not run the program. Instead there is an error and only the option to close it. It would be appreciated if anyone could please provide an answer to why it is doing that. Below I will list a couple facts. Please be specific in your answer (such as if the reason is that I may have used something in the GUI not available with windows, please provide examples of what is not usable between the operating systems) I am at approximately mid entry level when it comes to using Qt so forgive me in advance if I ask for further explanation on answers.

  • Compiling with Qt Creator 2.8.1 (Based on 5.1.1)
  • Using Crunchbang 11 (Debian 7.0 based)
  • Tested by using "cd mxe && make qtbase" and subsequently "cd mxe && make qt5"
  • The error produced by executing the program (wine): Pastebin: Wine Error
  • The debugging displayed in the terminal when the program is executed: Pastebin: Debugging
  • The program does not work in typical Windows 7 environment
  • Build log: Pastebin: Build Log

It may take me a couple hours from the initial post time to follow up. Thank you in advance to everyone who puts in positive input.

8
  • what system are you on? maybe there is a qt built with mingw you can just install through a package manager. Also: what is compcal and what does it have to do with Pokemon? ;) Commented Dec 28, 2013 at 11:34
  • 1
    error appears to be null pointer access originating from your code Commented Dec 28, 2013 at 11:36
  • Could you please show the build log? Commented Dec 28, 2013 at 11:49
  • looking at similar errors it seems wine's dll is somewhat .. lacking. Functionality of some things is actually missing :) Have you tried on windows? Maybe `winetricks comctl32 at a shell will fix it. Commented Dec 28, 2013 at 11:51
  • @user3125280: I believe the OP tried on W7. See this in the post: "The program does not work in typical Windows 7 environment". Commented Dec 28, 2013 at 12:34

1 Answer 1

1

I succesfully crosscompiled a program on ArchLinux for Windows.
Do you have all necessary dlls on your windows machine?
This is a list from my dir:

platforms <DIR>
 - qminimal.dll
 - qwindows.dll
sqldrivers <DIR>
 - qsqlite.dll
icudt51.dll
icuin51.dll
icuuc51.dll
libgcc_s_dw2-1.dll
libstdc++-6.dll
libwinpthread-1.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Sql.dll
Qt5Widgets.dll

It's also crucial to have the right versions of all dlls. These must match the MinGW version used to crosscompile. Also the platforms directory with its two dlls is necessary. For my app I also needed SQLite support, therefore it's necessary to create another subdirectory with the needed dll.

Sign up to request clarification or add additional context in comments.

1 Comment

I'll check that shortly as I am currently installing a virtual OS to speed up testing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.