编译QT例子工程animatedtiles遇到问题及解决办法

安装了qt creator 2.0.1 编译example animatedtiles 就遇到问题了,点击run按钮就报告 :: error: collect2: ld returned 1 exit status

compile Output 窗口内容:

Running build steps for project animatedtiles...

Configuration unchanged, skipping qmake step.

Starting: "D:/MinGW/bin/mingw32-make.exe" -w

mingw32-make: Entering directory `D:/Qt/4.6.3/examples/animation/animatedtiles'


D:/MinGW/bin/mingw32-make -f Makefile.Debug all

mingw32-make[1]: Entering directory `D:/Qt/4.6.3/examples/animation/animatedtiles'

mingw32-make[1]: Nothing to be done for `all'.

mingw32-make[1]: Leaving directory `D:/Qt/4.6.3/examples/animation/animatedtiles'

D:/MinGW/bin/mingw32-make -f Makefile.Release all

mingw32-make[1]: Entering directory `D:/Qt/4.6.3/examples/animation/animatedtiles'

g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release/animatedtiles.exe tmp/obj/release_shared/main.o tmp/obj/release_shared/qrc_animatedtiles.o -L"d:/Qt/4.6.3/lib" -L"d:/Qt/4.6.3/lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4

mingw32-make[1]: Leaving directory `D:/Qt/4.6.3/examples/animation/animatedtiles'

mingw32-make: Leaving directory `D:/Qt/4.6.3/examples/animation/animatedtiles'

d:/Qt/4.6.3/lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x1c2)锛氬鈥榑Unwind_Resume鈥欐湭瀹氫箟鐨勫紩鐢

d:/Qt/4.6.3/lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text$_ZN7QVectorIPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x187)锛氬鈥榑Unwind_Resume鈥欐湭瀹氫箟鐨勫紩鐢

d:/Qt/4.6.3/lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12)锛氬鈥榑_gxx_personality_v0鈥欐湭瀹氫箟鐨勫紩鐢

collect2: ld returned 1 exit status

mingw32-make[1]: *** [release/animatedtiles.exe] Error 1

mingw32-make: *** [release-all] Error 2


The process "D:/MinGW/bin/mingw32-make.exe" exited with code %2.

Error while building project animatedtiles (target: Desktop)

When executing build step 'Make'

工程debug目录中已经产生 exe文件了,也能运行,编译自己编写的工程不出问题

解决办法:

判断是qt lib目录下libqtmain.a 版本问题,通过使用configure -debug-release 然后 mingw32-make 重新编译得到新的 libqtmain.a,编译成功,不出任何错误提示了

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwjyzg.html