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

Loaden loaden at gmail.com
Wed Jul 11 15:52:47 CEST 2012


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'* <%60WinMain at 16%27>
>>> 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'* <%60WinMain at 16%27>
>>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120711/d02a8344/attachment.html>


More information about the Development mailing list