手动安装 Qucs 显示 Qt 头错误

手动安装 Qucs 显示 Qt 头错误
rajath@Rajathkumar:~$ cd Downloads
rajath@Rajathkumar:~/Downloads$ cd qucs-0.0.16
rajath@Rajathkumar:~/Downloads/qucs-0.0.16$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking for ar... ar
checking for lrelease-qt3... no
checking for lrelease... /usr/bin/lrelease
checking for lupdate-qt3... no
checking for lupdate... /usr/bin/lupdate
checking for moc-qt3... no
checking for moc... /usr/bin/moc
checking for uic-qt3... no
checking for uic... /usr/bin/uic
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... no
checking for Qt headers... configure: error: not found

答案1

apt-cache search libqt | grep headers返回

libqt3-compat-headers - Qt 1.x and 2.x compatibility includes
libqt3-headers - Qt3 header files
libqtgstreamer-dev - Development headers for QtGStreamer

这是如何搜索您没有的依赖项的基本示例。另请参阅http://ubuntuforums.org/showthread.php?t=124483帖子#8 有更详细的解释。

看起来您要抓取第二个并安装它。如果您不知道如何sudo apt-get install libqt3-headers操作:就可以了。

答案2

至少对我来说

sudo apt-get install build-essential libqt4-dev libqt4-qt3support automake libtool gperf flex bison git cmake

https://github.com/Qucs/qucs/wiki/Build-Linux

并继续

./configure
make
sudo make install

答案3

当您成功执行时,componentdialog.moc.cpp或文件many ~~~.moc.cpp似乎会自动创建。/use/bin/moc-qt4./configuremake

您在源文件中看不到它们。因此您需要已经安装了一些 qt4 二进制包。我使用的是 puppy-linux,所以已经qt_all-4.7.3.sfs安装了,但是使用它我无法编译 SUCS,所以卸载了它们。但是我以/usr/bin/moc-qt4某种方式从以前的 qt 安装中获得了它们。

您已使用以下命令在“某处”解压了 QUCS 源文件:

tar -xvzf qucs-0.0.18.131128.tar.gz

(0.0.18.131128) 是我的软件包的版本号。让我们将“某处”称为 SRC-DIR。

编译奎克斯您需要安装:

  • libqt3-compat-headers_3.deb

  • libqt3-headers_3.deb

  • libqt4-dev_4.deb

filewatcher.com并在搜索框中输入这些文件名,然后逐个按搜索按钮找到它们以下载并安装它们。

安装它们后:

  • libqt4-dev_4.deb将会在/usr/include/qt4
  • libqt3-compat-headers_3.deb并且libqt3-headers_3.deb会在/usr/include/qt3

您需要创建一个符号链接到/usr/include/qt4名为“Qt”/usr/include/~Q奎克斯 configure文件似乎正在寻找目录/usr/include/Qt而不是/usr/include/qt4qy3使用下一个命令:

ln -s /usr/include/qt4 /usr/include/Qt (Enter) to make the sim-link /usr/include/~Qt.

我们几乎已经完成了,但(~QT) 目录./configure中似乎有些混乱。 许多头文件不在正确的位置。由于需要很多文件,因此您可以使用以下命令将所有文件复制到其中:cp /usr/include/qt4/Qt/*.h /usr/include/qt4/usr/include/qt4
.h/usr/include/qt4/Qt/*.h/usr/include/qt4/*.h

并使用以下命令建立/usr/include/qt4/QtGui到的链接:/usr/include

ln -s /usr/include/qt4/QtGui /usr/include/QtGui

您还需要将下面列出的文件复制到/usr/include/qt4目录/usr/include/qt4/Qt3Support/usr/include/qt4/QtCore目录中。

  • Q3Dict (来自/Qt3Support),cp /usr/include/qt4/Qt3Support/Q3Dict /usr/include/qt4
  • Q3GridLayout(来自/Qt3Support), cp /usr/include/qt4/Qt3Support/Q3GridLayout /usr/include/qt4
  • Q3PtrList (来自/Qt3Support), cp /usr/include/qt4/Qt3Support/Q3PtrList /usr/include/qt4
  • Q3ScrollView(来自/Qt3Support), cp /usr/include/qt4/Qt3Support/Q3ScrollView /usr/include/qt4
  • Q3TextSream(来自/Qt3Support), cp /usr/include/qt4/Qt3Support/Q3TextStream /usr/include/qt4
  • Q3VBoxLayout(来自/Qt3Support), cp /usr/include/qt4/Qt3Support/Q3VBoxLayout /usr/include/qt4
  • QProcess(来自/QtCore), cp /usr/include/qt4/QtCore/QProcess /usr/include/qt4
  • QSettings(来自/QtCore), cp /usr/include/qt4/QtCore/QSettings /usr/include/qt4

  • 这些文件是(~Qt).h中许多文件的链接。如果您使用 mc,您可以非常轻松地完成这些操作吗?/usr/include/qt4

您还需要将/usr/include/qt3/private目录及其内容复制/usr/include/qt4/usr/include/qt4/private

使用以下命令:

mkdir /usr/include/qt4/private
cp /usr/include/qt3/private/* /usr/include/qt4/private

现在,您可以在 SRC-DIR 上执行操作./configure。我希望它能够成功完成冗长的配置。

如果你现在make这样做,你几乎可以完成所有的编译奎克斯但它可以停止在:

/usr/bin/ld: cannot find -lQtCore
/usr/bin/ld: cannot find -lQtGui
/usr/bin/ld: cannot find -lQtXml
/usr/bin/ld: cannot find -lQt3Support
/usr/bin/ld: cannot find -lQtSvg
collect2: ld returned 1 exit status
make[3]: *** [qucs] Error 1
make[3]: Leaving directory `/root/SRC/qucs-0.0.18.131128/qucs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/SRC/qucs-0.0.18.131128/qucs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/SRC/qucs-0.0.18.131128'
make: *** [all] Error 2

如果您没有安装任何libqt4软件包。我之所以发生这种情况是因为我没有安装libqt4软件包。我会找出要安装的软件包,如果成功编译 Sucs,我会发布我所做的操作。

相关内容