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
  • Compiling QUCS is not really straightforward. If you do not want to develop it, I recommend the PPA: ppa:fransschreuder1/qucs. It works ok. If you do want to develop, better to subscribe to the mailing list and ask there. You have building instruction at github.com/Qucs/qucs/wiki/Build-Linux – Rmano Apr 29 '14 at 16:30

apt-cache search libqt | grep headers returns

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

That is a basic example of how to search for dependencies you don't have. Also see http://ubuntuforums.org/showthread.php?t=124483 post #8 for a more thorough explanation.

It looks like you're going to want to grab the second one and install it. If you don't know how: sudo apt-get install libqt3-headers will do the trick.


At least for me it worked out to

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

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

and go on with

sudo make install
  • This one worked for me. – ugly_duck Nov 5 '15 at 11:30

The componentdialog.moc.cpp or many ~~~.moc.cpp files seem to be get created automatic by /use/bin/moc-qt4 when you do successfully ./configure and make.

You do not see them in your source files. So you need to have already some qt4 binary package installed. I am on puppy-linux so had qt_all-4.7.3.sfs installed but with it I could not get not far compiling SUCS so uninstalled them. Yet I had /usr/bin/moc-qt4 somehow from previous qt installation.

You have the source file of QUCS unpacked "somewhere" with a command:

tar -xvzf qucs-

( was the version number of my package. Let call the "somewhere" as SRC-DIR.

To compile Qucs you need to install:

  • libqt3-compat-headers_3.deb

  • libqt3-headers_3.deb

  • libqt4-dev_4.deb

Go to filewatcher.com and enter these file name in the search box and press search button one by one to find them to download and install them.

When you have installed them:

  • libqt4-dev_4.deb would be in /usr/include/qt4.
  • libqt3-compat-headers_3.deb and libqt3-headers_3.deb would be in /usr/include/qt3.

You need to do to make a symlink to the /usr/include/qt4 with the name "Qt" as /usr/include/~Qt as Qucs configure file seem to be looking for the directory /usr/include/Qt instead of /usr/include/qt4 or qy3 with the next command:

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

We are almost there to do ./configure but there seems to be a bit of confusion in the /usr/include/qt4 (~QT) directory.
Many of the header files are not in the right place. Because it would require so many of them you might well copy all .h files in /usr/include/qt4/Qt/*.h into as /usr/include/qt4/*.h with this command: cp /usr/include/qt4/Qt/*.h /usr/include/qt4

And make a link to /usr/include/qt4/QtGui in /usr/include with the following command:

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

You also need to copy files listed below to /usr/include/qt4 directory from /usr/include/qt4/Qt3Support and /usr/include/qt4/QtCore directories.

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

  • These files are links to many of .h files in /usr/include/qt4 (~Qt). If you use mc you can do these very easily?

You also need to copy /usr/include/qt3/private directory with it's contents to /usr/include/qt4 as /usr/include/qt4/private.

with the commands:

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

Now, you can do at the SRC-DIR ./configure. It will, I hope, successfully complete lengthy configuration.

If you do now make this will get you almost all the way compiling Qucs but it could stop at:

/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-'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/SRC/qucs-'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/SRC/qucs-'
make: *** [all] Error 2

If you did not have installed any libqt4 packages. This is happen to me because I have not installed libqt4 package. I would find out package to install and if succeed in compiling Sucs I would post what I did.

  • 3
    Will +1 if you format your post so that it is readable... click edit and then click on the upper right orange question mark to see the help. – Rmano Apr 29 '14 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.