Thread (2) 썸네일형 리스트형 QThread 사용시 컴파일 오류 QThread를 사용하여 컴파일을 하면 thread1.h:12: parse error before `{' token thread1.h:13: virtual outside class declaration 이와 같은 오류가 발생합니다. progen으로 생성한 .pro 파일을 열어서 CONFIG += thread 를 해주고 qmake 하시면 컴파일시 qthread로 인한 오류가 발생하지 않습니다. 컴파일시 pthread 오류 리눅스 콘솔에서 컴파일할때 pthread를 사용하였을때 이런 오류가 뜬다. undefined reference to `pthread_create' undefined reference to `pthread_join' 해결 방법은 옵션 2가지를 넣어주면 됩니다. -D_REENTRANT -lpthread ex) gcc test.c -o test -D_REENTRANT -lpthread 이전 1 다음