我創建Qt Creator中使用 文件 - >新建文件或項目 - >非Qt的項目 - >純C項目運行純C項目Qt Creator中
的main.c
一個普通的C項目#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
test.pro
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.c
我建用Ctrl + B這是成功的項目。但我無法使用Ctrl + R運行該項目。 我前面用來運行下面的命令來編譯和運行C程序
gcc main.c
./a.out
,但現在我不能夠獲得如何在Qt Creator中運行C程序。 我是Qt Creator的新手。請幫助
在QtC中,像這樣的trobulesleshoot問題的一種方法通常是查看Qt Creator窗口底部的* Compile Output *和* Application Output *視圖(分別是鍵盤快捷鍵* alt-4 *和* alt-3 * )。 – hyde