나는 간단한 Qt 프로그램을 가지고 있습니다. make
를 실행하는 경우는Qt : 실행 파일이 재생성되지 않았습니다.
make: Circular main.o <- QThread dependency dropped.
In file included from mythread.h:4,
from main.cpp:3:
./QThread:1: error: stray '\127' in program
./QThread:1: error: stray '\2' in program
./QThread:1: error: stray '\1' in program
./QThread:1: error: stray '\1' in program
In file included from mythread.h:4,
from main.cpp:3:
./QThread:1:8: warning: null character(s) ignored
./QThread:1: error: stray '\2' in program
./QThread:1:18: warning: null character(s) ignored
./QThread:1: error: expected constructor, destructor, or type conversion before '>' token
./QThread:1:20: warning: null character(s) ignored
./QThread:1: error: stray '\1' in program
./QThread:1:22: warning: null character(s) ignored
./QThread:1: error: stray '\240' in program
./QThread:1: error: stray '\21' in program
./QThread:1:28: warning: null character(s) ignored
./QThread:1: error: stray '@' in program
./QThread:1:34: warning: null character(s) ignored
./QThread:1: error: stray '@' in program
./QThread:1: error: stray '\24' in program
./QThread:1:43: warning: null character(s) ignored
./QThread:1:54: warning: null character(s) ignored
./QThread:1: error: stray '@' in program
./QThread:1:56: warning: null character(s) ignored
./QThread:1: error: stray '\8' in program
./QThread:1:58: warning: null character(s) ignored
./QThread:1:60: warning: null character(s) ignored
...
./QThread:16: error: stray '\255' in program
./QThread:16: error: stray '\255' in program
./QThread:16: error: stray '\235' in program
./QThread:16: error: stray '\156' in program
./QThread:16: error: stray '\137' in program
./QThread:16: error: stray '\195' in program
./QThread:16: error: stray '\199' in program
./QThread:16: error: stray '\144' in program
./QThread:16:252: warning: null character(s) ignored
./QThread:16: error: stray '@' in program
./QThread:16: error: stray '\139' in program
./QThread:16: error: stray '\16' in program
./QThread:16: error: stray '\240' in program
./QThread:16: error: stray '\255' in program
./QThread:16: error: stray '\8' in program
./QThread:16: error: stray '\15' in program
./QThread:16: error: stray '\149' in program
./QThread:16: error: stray '\194' in program
./QThread:16: error: stray '\132' in program
./QThread:16: error: stray '\210' in program
./QThread:16: error: stray '\139' in program
./QThread:16: error: expected declaration before '}' token
In file included from main.cpp:3:
mythread.h:1:1: unterminated #ifndef
make: *** [main.o] Error 1
QThread
1200 선 길이 오류가 실행 파일입니다 제공합니다. 삭제하고 make
을 다시 실행하면 컴파일이 완료됩니다. 그러나 내가 약간의 변경을 할 때 make
는 나에게 같은 오류를 준다. Makefile
을 사용하여 qmake
을 사용하고 있는데, 실행 파일이 다시 생성되지 않는 이유는 무엇입니까?
QThread.pro
######################################################################
# Automatically generated by qmake (2.01a) Mon Jan 21 10:22:12 2013
######################################################################
TEMPLATE = app
TARGET =
# Input
HEADERS += mythread.h
SOURCES += main.cpp mythread.cpp
편집기에서 파서가 지원하지 않는 모드로 파일을 저장하는 것처럼 보입니다. 저장 옵션을 확인하십시오. – lapk
.pro 파일의 내용을 게시 할 수 있습니까? 컴파일러가 .o 파일을 C++ 소스 코드처럼 컴파일하려고하는 것 같습니다. .pro 파일에는 .o 파일이 아닌 프로그램의 .cpp 파일 목록이 있어야합니다. 또한 Qt 클래스의 이름이기 때문에 실행 파일 QThread의 이름을 지정하는 것은 현명하지 않을 수 있습니다. 아마도 그것은 qmake/make 시스템에서 어떤 것을 혼란스럽게합니다. –
@JeremyFriesner 프로그램 이름이 바뀌었고 작동합니다. 고마워요. – Ashot