[Development] Qt5 beta, MinGW: undefined reference to `WinMain at 16'

Loaden loaden at gmail.com
Thu Jul 12 06:31:50 CEST 2012


Try to build qbs or qbs's test demos.
Not build Qt5 self, but build an GUI based applications.

2012/7/12 Konstantin Ritt <ritt.ks at gmail.com>

> E:\opt\Qt\5.0>gcc --version
> gcc (GCC) 4.6.2
> win32 (XP, SP2)
> builds ok
>
> Konstantin
>
>
> 2012/7/11 Loaden <loaden at gmail.com>:
> > Both w32 and w64 have the same issue, MinGW 4.6.3. (platform: Ubuntu and
> > Windows).
> > B.T.W I can't build Qt5 use MinGW 4.7.1 under Windows, but MinGW 4.6.3
> can
> > build successful, except install failed.
> >
> > 2012/7/11 <casper.vandonderen at nokia.com>
> >
> >> Hi,
> >>
> >> Which GCC is this (both for w32 and w64)? For KDE I tried to use 4.6.4
> and
> >> we are having a lot of problems with that, so we are now waiting for a
> >> patched GCC 4.7.x
> >>
> >> Casper
> >>
> >> From: ext Loaden <loaden at gmail.com>
> >> Date: Wednesday, July 11, 2012 3:52 PM
> >> To: "shane.kearns at accenture.com" <shane.kearns at accenture.com>
> >> Cc: "development at qt-project.org" <development at qt-project.org>
> >> Subject: Re: [Development] Qt5 beta, MinGW: undefined reference to
> >> `WinMain at 16'
> >>
> >> Does anyone care about mingw support?
> >> It's an qt5 issue, or an mingw issue?
> >> I don't sure anything, but it's real noise!
> >> Because I can't corss build for Windows use Qt5 now.
> >>
> >>
> >>
> http://sourceforge.net/tracker/?func=detail&atid=983354&aid=3539247&group_id=202880
> >>
> >> 2012/7/6 Loaden <loaden at gmail.com>
> >>>
> >>> I just create a bug report, and hope someone can take of.
> >>> It's only Qt5 issue, Qt4 works well!!
> >>>
> >>> 2012/7/5 Loaden <loaden at gmail.com>
> >>>>
> >>>> Yes, same problem happened when using qmake.
> >>>> for qbs, I made a patch for link to static library, see:
> >>>> https://codereview.qt-project.org/#change,29232
> >>>>
> >>>> 2012/7/5 <shane.kearns at accenture.com>
> >>>>
> >>>>> Does the same problem happen if using qmake instead of qbs?
> >>>>>
> >>>>> There is a qtmain.lib static library that should be added
> automatically
> >>>>> to windows executables, which provides the WinMain entry point.
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>>
> >>>>>
> >>>>>
> >>>>> From: development-bounces+shane.kearns=accenture.com at qt-project.org
> >>>>> [mailto:development-bounces+shane.kearns=
> accenture.com at qt-project.org] On
> >>>>> Behalf Of Loaden
> >>>>> Sent: 05 July 2012 04:15
> >>>>> To: development
> >>>>> Subject: [Development] Qt5 beta, MinGW: undefined reference to
> >>>>> `WinMain at 16'
> >>>>>
> >>>>>
> >>>>>
> >>>>> main.cpp
> >>>>>
> >>>>> #include <QCoreApplication>
> >>>>>
> >>>>> int main(int argc, char **argv)
> >>>>> {
> >>>>>     QCoreApplication app(argc, argv);
> >>>>>     return app.exec();
> >>>>> }
> >>>>>
> >>>>> test.qbp
> >>>>>
> >>>>> import qbs.base 1.0
> >>>>>
> >>>>> Application {
> >>>>>     name : "Test"
> >>>>>
> >>>>>     Depends {
> >>>>>         name: "Qt.widgets"
> >>>>>     }
> >>>>>
> >>>>>     files : [
> >>>>>         "main.cpp"
> >>>>>     ]
> >>>>> }
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>  MinGW-TDM32:
> >>>>>
> >>>>>
> >>>>>
> >>>>> Found project file D:\qpSOFT\Projects\Test\test.qbp
> >>>>> loading project took:  79 ms
> >>>>> build graph took:  14 ms
> >>>>> for t86-tdm-mingw32-release:
> >>>>>   - [hpp, application] Test as t86-tdm-mingw32-release
> >>>>>
> >>>>> compiling main.cpp
> >>>>> linking Test.exe
> >>>>> D:\qpSOFT\MinGW\TDM-MinGW32\bin/g++ -O2 -Wall -W
> >>>>> D:/qpSOFT/Projects/Test/build/t86-tdm-mingw32-relea
> >>>>> se/.obj/Test/main.o -o
> >>>>> D:/qpSOFT/Projects/Test/build/t86-tdm-mingw32-release/Test.exe
> >>>>> -LD:/qpSOFT/Pr
> >>>>> ojects/BuildQt5-t86/qtbase/lib -lqtmain -lQtCore5 -lQtGui5
> -lQtWidgets5
> >>>>>
> >>>>>
> d:/qpsoft/mingw/tdm-mingw32/bin/../lib/gcc/mingw32/4.6.1/../../../libmingw32.a(main.o):
> >>>>> In function
> >>>>> `main':
> >>>>> C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference
> >>>>> to `WinMain at 16'
> >>>>> collect2: ld returned 1 exit status
> >>>>>
> >>>>>
> >>>>>
> >>>>> MinGW-w64
> >>>>>
> >>>>>
> >>>>>
> >>>>> D:\qpSOFT\MinGW\MinGW32\bin/g++ -m32 -O2 -Wall -W
> >>>>> D:/qpSOFT/Projects/Test/build/m86-mingw32-release/
> >>>>> .obj/Test/main.o -o
> >>>>> D:/qpSOFT/Projects/Test/build/m86-mingw32-release/Test.exe
> >>>>> -LD:/qpSOFT/Projects/
> >>>>> BuildQt5-m86/qtbase/lib -lqtmain -lQtCore5 -lQtGui5 -lQtWidgets5
> >>>>>
> >>>>>
> d:/qpsoft/mingw/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/lib/../li
> >>>>> b/libmingw32.a(lib32_libmingw32_a-crt0_c.o): In function `main':
> >>>>>
> >>>>>
> /home/ruben/mingw-w64/toolchain/src/mingw-w64/tags/v2.0.3/mingw-w64-crt/crt/crt0_c.c:18:
> >>>>> undefined r
> >>>>> eference to `WinMain at 16'
> >>>>> collect2: ld returned 1 exit status
> >>>>>
> >>>>> --
> >>>>>
> >>>>>
> >>>>>
> >>>>> Please don't ask where I come from, It's a shame!
> >>>>>
> >>>>> Best Regards
> >>>>>
> >>>>> Yuchen
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> ________________________________
> >>>>> Subject to local law, communications with Accenture and its
> affiliates
> >>>>> including telephone calls and emails (including content), may be
> monitored
> >>>>> by our systems for the purposes of security and the assessment of
> internal
> >>>>> compliance with Accenture policy.
> >>>>>
> >>>>>
> ______________________________________________________________________________________
> >>>>>
> >>>>> www.accenture.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Please don't ask where I come from, It's a shame!
> >>>> Best Regards
> >>>> Yuchen
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Please don't ask where I come from, It's a shame!
> >>> Best Regards
> >>> Yuchen
> >>>
> >>
> >>
> >>
> >> --
> >> Please don't ask where I come from, It's a shame!
> >> Best Regards
> >> Yuchen
> >>
> >
> >
> >
> > --
> > Please don't ask where I come from, It's a shame!
> > Best Regards
> > Yuchen
> >
> >
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> >
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



-- 
Please don't ask where I come from, It's a shame!
Best Regards
Yuchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120712/676ea37b/attachment.html>


More information about the Development mailing list