❶ 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 编译器自己工作不正常。
去找给你这个编译器的人问问怎么回事吧。