首页 / 操作系统 / Linux / 编译QT例子工程animatedtiles遇到问题及解决办法
安装了qt creator 2.0.1 编译example animatedtiles 就遇到问题了,点击run按钮就报告 :: error: collect2: ld returned 1 exit statuscompile Output 窗口内容:Running build steps for project animatedtiles...Configuration unchanged, skipping qmake step.Starting: "D:/MinGW/bin/mingw32-make.exe" -wmingw32-make: Entering directory `D:/Qt/4.6.3/examples/animation/animatedtiles"
D:/MinGW/bin/mingw32-make -f Makefile.Debug allmingw32-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 allmingw32-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 statusmingw32-make[1]: *** [release/animatedtiles.exe] Error 1mingw32-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,编译成功,不出任何错误提示了