[Development] Qt4.8.2 link error with MinGW-builds GCC 4.7.1 on Windows 7

Yang Fan missdeer at gmail.com
Wed Jun 27 03:55:35 CEST 2012


Thanks Andy. I rebuilt the library, then it passed. I think it may be
caused by some .o files being not generated correctly.

On Wed, Jun 27, 2012 at 1:30 AM, andy fillebrown
<andy.fillebrown at gmail.com>wrote:

> Hi Yang,
>
> I've had similar issues in the past.  After a lot of head scratching I
> discovered the error was due to a very long command line in the
> QtWebKit make file.  The only way I could figure out to work around
> the problem was to move the Qt source tree closer to the root
> directory of the hard drive so the file name lengths were short enough
> to avoid the errors.
>
> I created a one letter folder at the root of the drive (C:\-\), then
> put the Qt source code there.  In my experience, you can get about
> 10-12 characters total in the directory name, including backslashes.
> Any more than that and the web kit build starts failing again.
>
> Hope that helps.
>
> Cheers,
> ~ andy.f
>
>
>
> On Mon, Jun 25, 2012 at 10:45 AM, Yang Fan <missdeer at gmail.com> wrote:
> > Hi All,
> >
> > I'm using MinGW-builds tool chain from
> > http://sourceforge.net/projects/mingwbuilds/ with GCC version 4.7.1 to
> build
> > Qt 4.8.2, but when I use 64 bit version of MinGW, then get the following
> > errors:
> > g++ -mthreads -shared
> > -Wl,--out-implib,d:\Qt-4.8.2-MinGW-GCC4.7.1-x64\lib\libQtW
> > ebKitd4.a -o ..\..\..\..\..\..\lib\QtWebKitd4.dll
> > object_script.QtWebKitd.Debug
> >  -L"d:\Qt-4.8.2-MinGW-GCC4.7.1-x64\lib" -L"..\..\WebCore\debug"
> > -L"..\..\JavaScr
> > iptCore\debug" -L"d:\Qt-4.8.2-MinGW-GCC4.7.1-x64\lib"
> > tmp\obj\debug_shared\QtWeb
> > Kitd_resource_res.o -lwebcore -ljscore -lwinmm -ladvapi32 -lshell32
> > -lshlwapi -l
> > version -lgdi32 -lole32 -luser32 -lQtGuid4 -lQtNetworkd4
> > -LE:\openssl-0.9.8k_WIN
> > 32 -Le:\openssl-0.9.8k_WIN32\lib -lQtCored4
> > Creating library file: d:\Qt-4.8.2-MinGW-GCC4.7.1-x64\lib\libQtWebKitd4.a
> >
> ./tmp\obj\debug_shared\JSHTMLScriptElement.o:JSHTMLScriptElement.cpp:(.text+0xe2
> > b): undefined reference to `WebCore::HTMLScriptElement::async() const'
> >
> ./tmp\obj\debug_shared\JSHTMLScriptElement.o:JSHTMLScriptElement.cpp:(.text+0x15
> > 35): undefined reference to
> `WebCore::HTMLScriptElement::setText(WTF::String
> > con
> > st&)'
> >
> ./tmp\obj\debug_shared\JSHTMLScriptElement.o:JSHTMLScriptElement.cpp:(.text+0x1c
> > 6c): undefined reference to `WebCore::HTMLScriptElement::setAsync(bool)'
> >
> c:/mingw470builds64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w
> > 64-mingw32/bin/ld.exe: ./tmp\obj\debug_shared\JSHTMLScriptElement.o: bad
> > reloc a
> > ddress 0x8 in section `.data'
> > collect2.exe: error: ld returned 1 exit status
> > mingw32-make[3]: *** [..\..\..\..\..\..\lib\QtWebKitd4.dll] Error 1
> > mingw32-make[3]: Leaving directory
> > `D:/Qt-4.8.2-MinGW-GCC4.7.1-x64/src/3rdparty/
> > webkit/Source/WebKit/qt'
> > mingw32-make[2]: *** [debug-all] Error 2
> > mingw32-make[2]: Leaving directory
> > `D:/Qt-4.8.2-MinGW-GCC4.7.1-x64/src/3rdparty/
> > webkit/Source/WebKit/qt'
> > mingw32-make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered]
> Error
> > 2
> > mingw32-make[1]: Leaving directory
> > `D:/Qt-4.8.2-MinGW-GCC4.7.1-x64/src/3rdparty/
> > webkit/Source'
> > mingw32-make: *** [sub-webkit-make_default-ordered] Error 2
> >
> > When I use the 32bit version of MinGW, then got the following errors:
> > g++ -mthreads -shared
> > -Wl,--out-implib,d:\Qt-4.8.2-MinGW-GCC4.7.1-x86\lib\libQtW
> > ebKitd4.a -o ..\..\..\..\..\..\lib\QtWebKitd4.dll
> > object_script.QtWebKitd.Debug
> >  -L"d:\Qt-4.8.2-MinGW-GCC4.7.1-x86\lib" -L"..\..\WebCore\debug"
> > -L"..\..\JavaScr
> > iptCore\debug" -L"d:\Qt-4.8.2-MinGW-GCC4.7.1-x86\lib"
> > tmp\obj\debug_shared\QtWeb
> > Kitd_resource_res.o -lwebcore -ljscore -lwinmm -ladvapi32 -lshell32
> > -lshlwapi -l
> > version -lgdi32 -lole32 -luser32 -lQtGuid4 -lQtNetworkd4
> > -LE:\openssl-0.9.8k_WIN
> > 32 -Le:\openssl-0.9.8k_WIN32\lib -lQtCored4
> > Creating library file: d:\Qt-4.8.2-MinGW-GCC4.7.1-x86\lib\libQtWebKitd4.a
> >
> ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o:JSWebKitBlobBuilder.cpp:(.text+0x77
> > 7): undefined reference to
> `WebCore::WebKitBlobBuilder::getBlob(WTF::String
> > cons
> > t&)'
> >
> ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o:JSWebKitBlobBuilder.cpp:(.text+0x8a
> > 2): undefined reference to
> `WebCore::WebKitBlobBuilder::getBlob(WTF::String
> > cons
> > t&)'
> >
> ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o:JSWebKitBlobBuilder.cpp:(.text+0xb3
> > 0): undefined reference to
> > `WebCore::WebKitBlobBuilder::append(WebCore::Blob*)'
> >
> ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o:JSWebKitBlobBuilder.cpp:(.text+0xc7
> > 8): undefined reference to
> > `WebCore::WebKitBlobBuilder::append(WebCore::ArrayBuf
> > fer*)'
> >
> ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o:JSWebKitBlobBuilder.cpp:(.text+0xe6
> > 6): undefined reference to
> `WebCore::WebKitBlobBuilder::append(WTF::String
> > const
> > &, int&)'
> >
> ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o:JSWebKitBlobBuilder.cpp:(.text+0xf3
> > a): undefined reference to
> `WebCore::WebKitBlobBuilder::append(WTF::String
> > const
> > &, WTF::String const&, int&)'
> >
> c:/mingw470builds32/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-m
> > ingw32/bin/ld.exe: ./tmp\obj\debug_shared\JSWebKitBlobBuilder.o: bad
> reloc
> > addre
> > ss 0x8 in section `.data'
> > collect2.exe: error: ld returned 1 exit status
> > mingw32-make[3]: *** [..\..\..\..\..\..\lib\QtWebKitd4.dll] Error 1
> > mingw32-make[3]: Leaving directory
> > `D:/Qt-4.8.2-MinGW-GCC4.7.1-x86/src/3rdparty/
> > webkit/Source/WebKit/qt'
> > mingw32-make[2]: *** [debug-all] Error 2
> > mingw32-make[2]: Leaving directory
> > `D:/Qt-4.8.2-MinGW-GCC4.7.1-x86/src/3rdparty/
> > webkit/Source/WebKit/qt'
> > mingw32-make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered]
> Error
> > 2
> > mingw32-make[1]: Leaving directory
> > `D:/Qt-4.8.2-MinGW-GCC4.7.1-x86/src/3rdparty/
> > webkit/Source'
> > mingw32-make: *** [sub-webkit-make_default-ordered] Error 2
> >
> > How can I resolve this issues and make the build successful?
> >
> > Regards,
> > Fan Yang
> >
> >
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> >
>



-- 
Regards,
Fan Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120627/45c5b96d/attachment.html>


More information about the Development mailing list