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.

Community
  • 1
  • 1
Ruiz
  • 93
  • 2
  • 6
  • 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? ;) – user3125280 Dec 28 '13 at 11:34
  • 1
    error appears to be null pointer access originating from your code – user3125280 Dec 28 '13 at 11:36
  • Could you please show the build log? – László Papp Dec 28 '13 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. – user3125280 Dec 28 '13 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". – László Papp Dec 28 '13 at 12:34
  • @LaszloPapp good catch - error is consistent with some that lacked proper comctl32 dll, though. Ruled out? – user3125280 Dec 28 '13 at 12:46
  • @user3125280: I have no idea. :) The OP will tell. If that does not work out, I would prefer to see the build log if everything had gone alright. – László Papp Dec 28 '13 at 12:47
  • Running "winetricks comctl32" actually caused the program to close before it ever opened. I'll be posting the build log momentarily. Also for the record, the program is just a simple entry level project to get me acquainted to working with QT. It's essentially a team build helper. – Ruiz Dec 28 '13 at 20:41

1 Answers1

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.

cee
  • 252
  • 3
  • 10
  • I'll check that shortly as I am currently installing a virtual OS to speed up testing – Ruiz Dec 30 '13 at 01:56