I am new to Qt and I am confused as to how this works, please forgive me if this is a stupid question so here it is.
I am running FreeBSD 13.0 and install all necessary packages for Qt 5 and I created a simple that found on the newly purchased book C++ GUI Programming with QT4 (Old) but I wanted to cover the basics
and when I compiled the code using $make I get a" fatal error 'QApplication' file not found. Below is my version of qmake
although I compiled the program with an error using "make" I still get an executable program which leads me to the next question guys. Qt program runs fine on FreeBSD but; when I copy the executable file to Linux Debian and Windows 10 and tried to execute the file but it did not run... What gives????... I thought Qt was a multi-platform, am I wrong? or am I doing it wrong? " Please forgive me if this is a stupid question like I said I am new to Qt and I want to create applications that are multi cross-platform that can run on Linux, Windows, and Unix.
I am running FreeBSD 13.0 and install all necessary packages for Qt 5 and I created a simple that found on the newly purchased book C++ GUI Programming with QT4 (Old) but I wanted to cover the basics
Code:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel hello("<center>Welcome to my first Qt program. Be the best!!!</center>");
hello.setWindowTitle("My First Qt Program");
hello.resize(400, 400);
hello.show();
return app.exec();
}
and when I compiled the code using $make I get a" fatal error 'QApplication' file not found. Below is my version of qmake
Code:
$qmake -v
QMAKE version 3.0
Using Qt version 5.15.2 in /usr/local/lib/qt5
although I compiled the program with an error using "make" I still get an executable program which leads me to the next question guys. Qt program runs fine on FreeBSD but; when I copy the executable file to Linux Debian and Windows 10 and tried to execute the file but it did not run... What gives????... I thought Qt was a multi-platform, am I wrong? or am I doing it wrong? " Please forgive me if this is a stupid question like I said I am new to Qt and I want to create applications that are multi cross-platform that can run on Linux, Windows, and Unix.