0
allan@allan-VirtualBox:~/blackjack_for_the_hopelessly_luckless$ make
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o advicewindow.o advicewindow.cpp
advicewindow.cpp:32:19: fatal error: QWidget: No such file or directory
compilation terminated.
make: *** [advicewindow.o] Error 1
allan@allan-VirtualBox:~/blackjack_for_the_hopelessly_luckless$ 

qt3 was installed using apt-get.

Header files are located in /usr/include/qt3/

Is there a g++ config file or something I need to update?

I'm new to compiling from source and not sure what to do.

Makefile was created using Qmake from project file.

Files in include directory are all lower case, should I change the code in advicewindow.cpp to qwidget.h?

Any help appreciated. Thanks.

Here are the includes in advicewindow.cpp

#include <QWidget>
#include <QLabel>
#include <QPixmap>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QMessageBox>
#include <cstdlib>
#include <ctime>
#include "blackjack.h"
#include "deck.h"
#include "player.h"
#include "dealer.h"
#include "advicewindow.h"
#include "jinxwindow.h"

Perhaps I am missing a QT development package that provides the includes?

After some searching I found that the folder /usr/include/QtGui/ is missing. This folder should contain the necessary files. I have qt3 and qt3-dev-tools installed as well as qtcreator. Where can I get the missing folder/files?

1
  • 1
    Is it possible to show your code and/or your project file to see what is wrong?
    – air-dex
    Jul 8, 2012 at 21:48

2 Answers 2

1

Found the necessary files in /usr/include/qt4/QtGui/

qmake was linked to qmake-qt3

I remade the project file and Makefile, then compiled with:

allan@allan-VirtualBox:qmake-qt4 -project
allan@allan-VirtualBox:qmake
allan@allan-VirtualBox:make

Executable is now compiled and running.

I already had qt3 AND qt4 installed. Just needed to use the right qmake.

Thanks to all for reading and helping me figure it out.

0

Run the following command to install the missing dependencies.

sudo apt-get install libqt4-dev

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .