On 7/1/2012 17:19, Loaden wrote:
> https://sourceforge.net/tracker/?func=detail&aid=3539247&group_id=202880&atid=983354
> 
>> /usr/bin/x86_64-w64-mingw32-g++ -m64 -O2 -Wall -W
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/uic/build/m64-mingw64-release/.obj/ui/bla.o
>> -o
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/uic/build/m64-mingw64-release/ui.exe
>> -L/home/loaden/qpSOFT/Projects/BuildQt5-m64/qtbase/lib -lqtmain -lQtCore5
>> -lQtGui5
>> */usr/lib/gcc/x86_64-w64-mingw32/4.6/../../../../x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):
>> In function `main':
>> /build/buildd/mingw-w64-2.0.3/build/x86_64-w64-mingw32/all/mingw-w64-crt/../../../../mingw-w64-crt/crt/crt0_c.c:18:
>> undefined reference to `WinMain'*
>> collect2: ld returned 1 exit status
>>
> 
> 

You are missing main or WinMain in your code.

> Another question:
> 
>> linking HelloWorld.exe
>> /usr/bin/x86_64-w64-mingw32-g++ -m64 -O2 -Wall -W
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/link_staticlib/build/m64-mingw64-release/.obj/HelloWorld/main.o
>> -o
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/link_staticlib/build/m64-mingw64-release/HelloWorld.exe
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/link_staticlib/build/m64-mingw64-release/libmystaticlib.a
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/link_staticlib/build/m64-mingw64-release/libhelperlib.a
>> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/link_staticlib/build/m64-mingw64-release/libmystaticlib.a:
>> *could not read symbols: Archive has no index; run ranlib to add one*
>> collect2: ld returned 1 exit status
>>
> 
> After run : x86_64-w64-mingw32-ranlib
> /home/loaden/qpSOFT/Projects/Qbs/tests/manual/link_staticlib/build/m64-mingw64-release/libmystaticlib.a
> Then everything works well.

This step is normally unnecessary, You may need to check how those files
are created. I suspect your build machinery is lacking in handling cross
compile scenarios.

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to