❶ Qt creator編譯出錯,怎麼解決
項目目錄不能有中文
❷ Qt中的編譯錯誤
No rule to make target `../laying_out_widgets.cpp', needed by `debug/laying_out_widgets.o'. Stop.
這個是說你的Makefile文件裡面沒有提供laying_out_widgets.cpp的編譯規則。
不知道你是自己寫的Makefile還是自動生成的Makefile,總之就是這個Makefile有點問題。相應的增加laying_out_widgets.cpp的編譯規則就可以了。
在工程裡面添加laying_out_widgets.cpp文件就可以了 ,會重新自動生成新的Makefile。
❸ Qt 編譯問題 :-1: error: collect2: error: ld returned 1 exit status
程序重新編譯,看看進程管理器中是否有你運行的程序.有可能是程序已經運行了一個實例,無法刪除之前的那個,所以才這樣報錯.
❹ 在qt上編譯出現以下問題,怎麼解決
int main(int argc, char * argv[]) // 直接這樣寫
❺ qt編譯時出現問題
清理項目
2. 重新構建項目
3.執行 qmake
❻ cmake + Qt 5 編譯出錯,請幫忙看看怎麼解決
Qt在編譯時,需要首先使用uic.exe編譯UI文件,通過moc.exe處理Q_OBJECT之類的宏,當然你可以去掉這些定義,否則就需要加上:
# COMPILE UIs
SET(UIS
mnwindow
)
FOREACH (ui_file ${UIS})
SET(TMP_IN "${PROJECT_SOURCE_DIR}/res/${ui_file}.ui")
SET(TMP_OUT "${PROJECT_BINARY_DIR}/ui_${ui_file}.h")
EXECUTE_PROCESS(COMMAND ${QT_FOLDER}/bin/uic.exe -o ${TMP_OUT} ${TMP_IN})
MESSAGE(STATUS "EXEC=${QT_FOLDER}/bin/uic.exe -o ${PROJECT_BINARY_DIR}/ui_${ui_file}.h ${PROJECT_SOURCE_DIR}/res/${ui_file}.ui")
ENDFOREACH(ui_file)
# CREATE MOC
SET(HEADERS
mainwindow
)
FOREACH (header_file ${HEADERS})
SET(TMP_IN "${PROJECT_SOURCE_DIR}/inc/${header_file}.h")
SET(TMP_OUT "${PROJECT_BINARY_DIR}/moc_${header_file}.cpp")
EXECUTE_PROCESS(COMMAND ${QT_FOLDER}/bin/moc.exe -o ${TMP_OUT} ${TMP_IN})
SET(MOCS ${MOCS} ${PROJECT_BINARY_DIR}/moc_${header_file}.cpp)
MESSAGE(STATUS "EXEC=${QT_FOLDER}/bin/moc.exe -o ${PROJECT_BINARY_DIR}/moc_${header_file}.cpp ${PROJECT_SOURCE_DIR}/inc/${header_file}.h")
ENDFOREACH(header_file)
free c#.net qr creator
這里要注意的是:EXECUTE_PROCESS在COMMAND後面不能加引號,命令直接寫,否則執行的程序也不會出錯,但也不會正常運行.
❼ Qt程序的一個編譯錯誤
endl; 去掉,它需要 #include<iostream> using namespace std;
qDebug() 會自動換行
❽ QT編譯錯誤,怎麼解決
項目->構建設置,把中文路徑改為英文路徑 ,記得清理之後再重新構建哦
❾ qt的helloworld程序編譯出錯,該如何處理
F:\temp_file\qt\hello>make
make -f Makefile.Debug
make[1]: Entering directory `F:/temp_file/qt/hello'
g++ -mthreads -Wl,-subsystem,windows -o debug\hello.exe debug/hello.o -L"f:\loc
al_file\QT\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
f:\local_file\QT\lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
c:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:93: undefined refere
nce to `_Unwind_Resume'
c:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:135: undefined refer
ence to `_Unwind_Resume'
f:\local_file\QT\lib/libqtmaind.a(qtmain_win.o):c:\iwmake\build_mingw_opensource
\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:512: undefin
ed reference to `_Unwind_Resume'
f:\local_file\QT\lib/libqtmaind.a(qtmain_win.o):c:\iwmake\build_mingw_opensource
\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:513: undefin
ed reference to `_Unwind_Resume'
f:\local_file\QT\lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12):
undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[1]: *** [debug\hello.exe] Error 1
make[1]: Leaving directory `F:/temp_file/qt/hello'
make: *** [debug] Error 2
------解決方案-------------------------------------------------------- undefined reference to `_Unwind_Resume' 是不少頭文件,
------解決方案-------------------------------------------------------- 多個gcc版本
那也不會影響編譯。。默認都是最高版本的!
❿ 編譯Qt應用程序的時候出現如下錯誤,哪位高手給解答一下 編譯器是arm-linux-gcc 4.5.1,qt版本是4.7.0
你的編譯器有問題,內部錯誤。
這是 gcc 編譯器自己工作不正常。
去找給你這個編譯器的人問問怎麼回事吧。