how to fix QT5.3 &&QT5.7 complier difference
-
These day I try to install QT5.7 on raspberry pi3, but failed, try to install QT5.3 on it. but when I try to downgrade my project to QT5.3 there is a compiler error:
D:\Users\tong\Documents\FMT_L\png.h:505: error: expected '=', ',', ';', 'asm' or 'attribute' before 'png_structrp'
typedef png_struct * PNG_RESTRICT png_structrp;
but the project is OK under QT5.7, the source code contains libpng.
i think there should be some gcc/g++ compiler difference, but i don't know how to fix them, can anyone helps me ? thank you !^
-
@JiujiuTong said in how to fix QT5.3 &&QT5.7 complier difference:
These day I try to install QT5.7 on raspberry pi3, but failed, try to install QT5.3 on it. but when I try to downgrade my project to QT5.3 there is a compiler error:
D:\Users\tong\Documents\FMT_L\png.h:505: error: expected '=', ',', ';', 'asm' or 'attribute' before 'png_structrp'
typedef png_struct * PNG_RESTRICT png_structrp;
but the project is OK under QT5.7, the source code contains libpng.
i think there should be some gcc/g++ compiler difference, but i don't know how to fix them, can anyone helps me ? thank you !^
more info:
D:\Users\tong\Documents\FMT_L\png.h:506: error: expected '=', ',', ';', 'asm' or 'attribute' before 'png_const_structrp'
typedef const png_struct * PNG_RESTRICT png_const_structrp;
^
D:\Users\tong\Documents\FMT_L\png.h:507: error: expected '=', ',', ';', 'asm' or 'attribute' before 'png_inforp'
typedef png_info * PNG_RESTRICT png_inforp;
^
...
D:\Users\tong\Documents\FMT_L\png.h:941: error: unknown type name 'png_structrp'
PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
^
... -
@JiujiuTong said in how to fix QT5.3 &&QT5.7 complier difference:
i think there should be some gcc/g++ compiler difference
Do you use the same compiler with Qt 5.3 as you used with 5.7?
-
@JiujiuTong What is the error code?
-
@JiujiuTong Do you use any libraries compiled with mingw482_32?
You should debug to get more information (stack trace). -
@JiujiuTong What about libraries?
-
@JiujiuTong You can use ldd for that.
You can try to start your executable like this:strace YOUR_EXE
maybe this will show something interesting.
-
@JiujiuTong But your target is Raspberry PI, right? Or are you running Windows on it?
-
-
@jsulm
ntdll!EtwEventProviderEnabled+0x1817:
00007ffaacc8fc97 488b8c2400010000 mov rcx,qword ptr [rsp+100h] ss:00000000
0009f460=000000000009f820
0:000> t
ntdll!EtwEventProviderEnabled+0x181f:
00007ffaacc8fc9f ffd3 call rbx {wow64!Wow64LdrpInitialize (00000000
6606bba0)}
0:000> p
ModLoad: 0000000000130000 00000000
001dd000 WOW64_IMAGE_SECTION
ModLoad: 0000000074ce0000 00000000
74dc0000 WOW64_IMAGE_SECTION
ModLoad: 0000000000130000 00000000
001dd000 NOT_AN_IMAGE
ModLoad: 0000000001170000 00000000
012c6000 NOT_AN_IMAGE
ModLoad: 0000000066050000 00000000
66058000 C:\WINDOWS\system32\wow64cpu.dll
ModLoad: 0000000074ce0000 00000000
74dc0000 C:\WINDOWS\SysWOW64\KERNEL32.DLL
ModLoad: 00000000779d0000 00000000
77b4e000 C:\WINDOWS\SysWOW64\KERNELBASE.dll
ModLoad: 00000000761d0000 00000000
7628e000 C:\WINDOWS\SysWOW64\msvcrt.dll
ModLoad: 0000000077740000 00000000
77887000 C:\WINDOWS\SysWOW64\USER32.dll
ModLoad: 0000000076940000 00000000
76a8f000 C:\WINDOWS\SysWOW64\GDI32.dll
ModLoad: 0000000001900000 00000000
0da15000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Guid.dll
ModLoad: 000000006d7c0000 00000000
701ba000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Multimediad.dll
ModLoad: 000000000da20000 00000000
14ade000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Cored.dll
ModLoad: 0000000068b00000 00000000
68da7000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5MultimediaWidgetsd.dll
ModLoad: 0000000014ae0000 00000000
17be9000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Networkd.dll
ModLoad: 0000000064780000 00000000
648e6000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5SerialPortd.dll
ModLoad: 00000000766e0000 00000000
7675b000 C:\WINDOWS\SysWOW64\ADVAPI32.dll
ModLoad: 0000000076850000 00000000
76894000 C:\WINDOWS\SysWOW64\sechost.dll
ModLoad: 0000000076530000 00000000
765dd000 C:\WINDOWS\SysWOW64\RPCRT4.dll
ModLoad: 0000000074aa0000 00000000
74abe000 C:\WINDOWS\SysWOW64\SspiCli.dll
ModLoad: 0000000074a90000 00000000
74a9a000 C:\WINDOWS\SysWOW64\CRYPTBASE.dll
ModLoad: 0000000076290000 00000000
762e8000 C:\WINDOWS\SysWOW64\bcryptPrimitives.dll
ModLoad: 0000000077130000 00000000
7753b000 C:\WINDOWS\SysWOW64\SETUPAPI.dll
ModLoad: 0000000076350000 00000000
76387000 C:\WINDOWS\SysWOW64\CFGMGR32.dll
ModLoad: 0000000017bf0000 00000000
20b28000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Widgetsd.dll
ModLoad: 0000000076a90000 00000000
76c09000 C:\WINDOWS\SysWOW64\CRYPT32.dll
ModLoad: 00000000764b0000 00000000
764be000 C:\WINDOWS\SysWOW64\MSASN1.dll
ModLoad: 0000000077cc0000 00000000
77d1f000 C:\WINDOWS\SysWOW64\WS2_32.dll
ModLoad: 0000000069340000 00000000
694b4000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Xmld.dll
ModLoad: 0000000020b30000 00000000
2c4fd000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5XmlPatternsd.dll
ModLoad: 00000000778e0000 00000000
779cb000 C:\WINDOWS\SysWOW64\ole32.dll
ModLoad: 0000000077550000 00000000
7770d000 C:\WINDOWS\SysWOW64\combase.dll
ModLoad: 000000002c500000 00000000
2c523000 D:\Qt\4.8.6\bin\libgcc_s_dw2-1.dll
ModLoad: 0000000074dc0000 00000000
761be000 C:\WINDOWS\SysWOW64\SHELL32.dll
ModLoad: 0000000076c10000 00000000
7710a000 C:\WINDOWS\SysWOW64\windows.storage.dll
ModLoad: 0000000077d20000 00000000
77d65000 C:\WINDOWS\SysWOW64\shlwapi.dll
ModLoad: 00000000764c0000 00000000
764cc000 C:\WINDOWS\SysWOW64\kernel.appcore.dll
ModLoad: 0000000076420000 00000000
764ad000 C:\WINDOWS\SysWOW64\shcore.dll
ModLoad: 0000000064940000 00000000
64953000 D:\Qt\4.8.6\bin\libwinpthread-1.dll
ModLoad: 00000000764e0000 00000000
76524000 C:\WINDOWS\SysWOW64\powrprof.dll
ModLoad: 0000000077540000 00000000
7754f000 C:\WINDOWS\SysWOW64\profapi.dll
ModLoad: 000000002c530000 00000000
2c623000 D:\Qt\4.8.6\bin\libstdc++-6.dll
ModLoad: 000000006b7c0000 00000000
6c6c2000 D:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5OpenGLd.dll
ModLoad: 0000000073e40000 00000000
73ec4000 C:\WINDOWS\SysWOW64\DNSAPI.DLL
ModLoad: 00000000748a0000 00000000
748cf000 C:\WINDOWS\SysWOW64\IPHLPAPI.DLL
ModLoad: 00000000767c0000 00000000
767c7000 C:\WINDOWS\SysWOW64\NSI.dll
ModLoad: 00000000730b0000 00000000
730c6000 C:\WINDOWS\SysWOW64\MPR.DLL
(1bac.19f8): Unknown exception - code c0000139 (first chance)
(1bac.aa4): Unknown exception - code c0000139 (first chance)
WARNING: Step/trace thread exited
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\wow64cpu.dll -
wow64cpu!TurboDispatchJumpAddressEnd+0x540:
00000000`660521bc c3 ret -
@JiujiuTong Why do you have Qt 4.8.6 related DLLs here:
D:\Qt\4.8.6\bin\libgcc_s_dw2-1.dll D:\Qt\4.8.6\bin\libwinpthread-1.dll D:\Qt\4.8.6\bin\libstdc++-6.dll
Did you add D:\Qt\4.8.6\bin to your PATH?
-
@jsulm
depend libs:
QT5CORED.DLL
QT5GUID.DLL
QT5MULTIMDEIA.DLL
QT5NETWORK.DLL
QT5MULTIMDEIAWIDGETSD.DLL
QT5SERIALPORTD.DLL
QT5WIDGETSD.DLL
QT5XMLD.DLL
QT5XMLPATTERNSD.DLL
LIBGCC_S_DW2-1.DLL
KERNEL32.dll
MSVCRT.DLL
LIBWINPTHREAD-1.DLL
USER32.DLLLIBSTDC++-6.DLL -
@JiujiuTong Again: why do you have this:
D:\Qt\4.8.6\bin\libgcc_s_dw2-1.dll D:\Qt\4.8.6\bin\libwinpthread-1.dll D:\Qt\4.8.6\bin\libstdc++-6.dll
Those are most probably built using an older GCC version and are probably the reason for the crash.