커맨드 라인에서 Qt Creator 프로젝트를 컴파일하려고합니다. 여기 내가 한 일이있다.커맨드 라인에서 프로젝트를 컴파일 할 때 Qt 헤더를 찾을 수 없습니다.
$ qmake
$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DALLOWSYNCING -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o main.o main.cpp
In file included from ./model/videostream.h:4:0,
from ./model/videostreamersession.h:4,
from view/videoplayerwindow.h:4,
from main.cpp:3:
./model/videoframe.h:5:18: fatal error: QImage: No such file or directory
compilation terminated.
make: *** [main.o] Error 1
그것은 Qt는 관련 클래스의 헤더 파일을 찾을 수 없습니다 make
것 같습니다. make
어디에서 추가 매개 변수 또는 환경 변수를 사용하여 찾을 수 있습니까? 일부 검색 경로가 기본적으로 포함되어있는 것으로 나타 났지만 내 환경에서는 /opt/QtSDK/Desktop/Qt/474/gcc/include/
에 있습니다.
요청한대로, 내 PRO 파일. 처음에는 Qt Creator에 의해 생성되었으므로 일반적인 문제는 아닙니다.
QT += core gui
TARGET = output
TEMPLATE = app
SOURCES += # Trimmed for brevity
HEADERS += # Trimmed for brevity
# Special build flags
DEFINES += ALLOWSYNCING
# These libraries are required for the program to operate
LIBS += -ljrtp -ljthread
.pro 파일을 추가하십시오. –
업데이트 된 게시물보기. – Pieter
올바른 것으로 보입니다./usr/include/qt4/QtGui 및/usr/include/qt4/QtGui/QImage가 있습니까? (어쩌면 당신은 어떻게 든 qmake 배포판 패키지가 설치되어 있지만 -dev는 아닌가?) SDK를 사용하려면 synthesizerpatel에서 제안하는대로 bin/dir을 PATH에 추가하십시오. –