I compiled QT 5.4.1 from ports devel/qt5 and also the x11/qt5-x11extras
I added qmake as a global variable, and now I'm trying to compile a very basic test.cpp file that looks like this:
I use:
I understand, based on this error, that the lQt5Gui is missing. I'm not sure at what point I skipped this lib. What am I doing wrong ? How can I add the lQt5Gui lib. ?
This is the .pro file:
I've tried to attach the MakeFile in here, but it seems it exceeds the maximum number of characters allowed per post. If it's needed, however, I can annex it separately.
I added qmake as a global variable, and now I'm trying to compile a very basic test.cpp file that looks like this:
Code:
#include <QTextStream>
#include <QDebug>
QTextStream cin(stdin);
QTextStream cout(stdout);
QTextStream cerr(stderr);
int main() {
int num1(1234), num2(2345);
cout << oct << num2 << '\t'
<< hex << num1 << '\t';
qDebug() << "QDebug, the same idea using <<";
qDebug("QDebug with place holders: %d ", num1);
return 0;
}
I use:
qmake -project to create a .pro qt file, then I use qmake to create a MakeFile. Then, when I run make I get the following error:
Code:
clang++ -pthread -Wl,-rpath,/usr/local/lib -o qt main.o -lQt5Gui -lQt5Core -lGL
/usr/bin/ld: cannot find -lQt5Gui
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
I understand, based on this error, that the lQt5Gui is missing. I'm not sure at what point I skipped this lib. What am I doing wrong ? How can I add the lQt5Gui lib. ?
This is the .pro file:
Code:
######################################################################
# Automatically generated by qmake (3.0) Sun May 3 21:54:13 2015
######################################################################
TEMPLATE = app
TARGET = qt
INCLUDEPATH += .
# Input
SOURCES += main.cpp
I've tried to attach the MakeFile in here, but it seems it exceeds the maximum number of characters allowed per post. If it's needed, however, I can annex it separately.