I'm trying to compile some code (not mine) and I run into errors. I have a couple questions:
我正在尝试编译一些代码(不是我的),我遇到了错误。我有几个问题:
1) Obviously, how do I fix my error, and
很明显,我该如何改正我的错误。
2a) I suspect that I need to install a Qt library/package or something or other but I just can't seem to figure out what I need to do. How do I determine what it is that I am actually missing, and
我怀疑我需要安装一个Qt库/包或者其他的东西,但是我似乎不知道我需要做什么。我如何确定我实际上错过了什么?
2b) where I can install it? (how best to use apt-file, locate, something else maybe?)
我可以在哪里安装?(如何最好地使用apt文件,定位,或者其他什么?)
I'm using ubuntu 12.04, 64bit and g++4.6.3
我使用的是ubuntu 12.04, 64位和g++4.6.3。
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -D_FORTIFY_SOURCE=2 -I/usr/include/Inventor/annex -D_REENTRANT -I/usr/share/qt4/include -I/usr/share/qt4/include/Qt -I/usr/local/include/Inventor/annex -D_REENTRANT -I/home/mishkin/mincinstall/include -g -O2 -MT brain-view.o -MD -MP -MF ".deps/brain-view.Tpo" -c -o brain-view.o brain-view.cc; \
then mv -f ".deps/brain-view.Tpo" ".deps/brain-view.Po"; else rm -f ".deps/brain-view.Tpo"; exit 1; fi
In file included from brainApp.h:80:0,
from callbacks.h:7,
from brain-view.cc:52:
vertstatsForm.h:12:14: fatal error: Qt: No such file or directory
I looked inside vertstatsForm.h:12:14 and the 12 line is #include < Qt >
我看了看vertstatsForm内部。h:12:14和12行是#include < Qt >。
#ifndef VERTSTATSFORM_H
#define VERTSTATSFORM_H
#include <Qt> <-----line 12
#include <qvariant.h>
#include <qdialog.h>
#include <Qt3Support/Q3GridLayout>
#include <QLabel>
2 个解决方案
#1
1
To answer question 1, try to remove
要回答问题1,试着去除。
#include <Qt>
If it still is not working, replace it with
如果它仍然没有工作,就替换它。
#include <QtCore>
#include <QtGui>
and/or other modules that you might need.
以及/或您可能需要的其他模块。
#2
0
To answer question 2, if the error message is
要回答问题2,如果错误消息是。
fatal error: QXXXX: No such file or directory
Do this
这样做
locate QXXXX
which will give you something like this
会给你这样的东西?
/usr/include/qt4/QtGui/QXXXX
which means you should replace
这意味着你应该更换?
#include <QXXXX>
with
与
#include <QtGui/QXXXX>
#1
1
To answer question 1, try to remove
要回答问题1,试着去除。
#include <Qt>
If it still is not working, replace it with
如果它仍然没有工作,就替换它。
#include <QtCore>
#include <QtGui>
and/or other modules that you might need.
以及/或您可能需要的其他模块。
#2
0
To answer question 2, if the error message is
要回答问题2,如果错误消息是。
fatal error: QXXXX: No such file or directory
Do this
这样做
locate QXXXX
which will give you something like this
会给你这样的东西?
/usr/include/qt4/QtGui/QXXXX
which means you should replace
这意味着你应该更换?
#include <QXXXX>
with
与
#include <QtGui/QXXXX>