Cross compiling with Qt and MinGW for Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I installed qt-win-opensource-4.0.1-mingw in Wine. I copied all dll's into system32 directory, and mingw10.dll too (because qt need it). Then i compiled a simple "Hello World!" with Qt dlls using MinGW for linux. I have no problem with cross compiling (0 errors & 0 warnings).

But when i run the app, wineserver & wine-preloader eat 90% of RAM and CPU and show only the border of windows, not the label, and the body of window is transparent.

I use Gentoo and use XMinGW (i386-mingw32msvc-g++ 3.4.4). The command line for compiling my example is:

joaquin@CUARTO ~/.wine/drive_c/Qt/4.0.1/examples/tutorial/t1 $ /opt/xmingw/bin/i386-mingw32msvc-g++ main.cpp -o t1.exe -DQT_EDITION=QT_EDITION_DESKTOP -DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_THREAD_SUPPORT -pipe -O2 -w -I../../../mkspecs/linux-g++ -I. -I../../../include/QtGui -I../../../include/QtCore -I../../../include -I../../../include/ActiveQt -I. -L/home/joaquin/.wine/drive_c/Qt/4.0.1/lib -lQtCore4 -lQtGui4

And the content of program is:

#include <QApplication>
#include <QPushButton>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QPushButton hello("Hello world!");
    hello.resize(100, 30);

    hello.show();
    return app.exec();
}

My question is: Do i need to compile the source in windows only? Can i run in Wine app cross compiled using Qt for windows and mingw for linux?

I need to do a little program for windows and i don't want install Win only for compiling a minimal program, so i thought that wine can help me if i can cross compile my program.

I am using a clean .wine directory. No programs, only Qt and MinGW libraries installed in system32.

Regards


Joaquín

P.S. Excuse me for my little english.. i speak spanish...

--
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)

mQFCBEFI/3wRAwCT7C2nZoChNsg04spnomyBYS5pBRuOJDxYOLI2vynZAf+GyxcW
J6L0BZ1JdRI7gxAL0MiXTkbM057Doimj/26JsiVoV8/WRbUdj+RKare3g4qK2B6U
EDZqh56HHiF3Lp8AoLoiw/Hp5aiaEK6H/uzKmqzsOgAtAv9iuT7mlP0D06/NiinM
0nknBikLOYyUn3pN0oTziyTac35WySo17nla/6mLzOIqQF5Vf0+BmPG+GoCGhZCv
5jKiv3jTSrue5a1ANL6CKJxN9KYQpWUuc8boEMKlmbJ67UYC/Az0uVJDrs84Ycv7
l9A73sNQZWHOQTnyqH5JdJE+ppYWn/mXQmj7QLsDMGTRtPoaRDgd5kesBWPbCLnm
U92SBinCOdK78vwkVgB8Yj07tTApd3PVWmy3gqKp+YDewroeuLQ2Sm9hcXXDrW4g
TWFudWVsIEZlcm7DoW5kZXogUXVpbGVzIDxqb2FxdWluZkBjYW50di5uZXQ+iF4E
ExECAB4FAkFI/3wCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQeU1Ud/3tgGde
UACdFRwRE2IOuyNd3gJE+q4K/EqGW48AnjzdslO5z9MSl4qFKYnyWX4mEtQ5
=X8k4
-----END PGP PUBLIC KEY BLOCK-----

_______________________________________________
wine-users mailing list
wine-users@xxxxxxxxxx
http://www.winehq.org/mailman/listinfo/wine-users


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux