Project ERROR: Could not find feature static.
-
Hi,
I am new to Qt.
I am trying to just run example application, which is available with Qt installation.
In the folder qt-everywhere-opensource-src-5.8.0/qtbase/examples/widgets/painting/basicdrawing, I tried to runqmake basicdrawing.pro.
But it showing error - Project ERROR: Could not find feature static.
Please provide suggestions for solving this problem.
Thanks & Regards,
Sajeevan.K -
Hi,
I am new to Qt.
I am trying to just run example application, which is available with Qt installation.
In the folder qt-everywhere-opensource-src-5.8.0/qtbase/examples/widgets/painting/basicdrawing, I tried to runqmake basicdrawing.pro.
But it showing error - Project ERROR: Could not find feature static.
Please provide suggestions for solving this problem.
Thanks & Regards,
Sajeevan.K@Sajeevan-K You can open an example project in QtCreator and build it there. It is easier especially if you're new to Qt.
Also if you call qmake like this then you're maybe calling qmake from another Qt installation/version (if you have more than one).
You can try to use an absolute path. -
Hi Jsulm,
Thank You for the reply. As You told there are two Qt installations in my system.
-
One from source and with qmake file /home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake
This is for cross compilation for an Embedded Target board. -
The other installed from qt-sdk package with qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
Now by using absolute path for the first qmake, I could compile some of the example applications successfully and deploy it in my embedded target board.
Example: qt-everywhere-opensource-src-5.8.0/qtbase/examples/widgets/widgets/calculatorBut when I am trying to do the same thing for qt3d examples it is showing the "Unknown Module(s) in Qt" error as shown below.
sajeevank@sajeevank-Vostro-3559:~/Downloads/qt-everywhere-opensource-src-5.8.0/qt3d/examples/qt3d/basicshapes-cpp$ /home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake basicshapes-cpp.pro
Project ERROR: Unknown module(s) in QT: 3dextras 3dcore 3drender 3dinputI tried both the ways You suggested and the result is as follows.
By using Qt Creator
Case1 - I selected Desktop in projects, the compiler /usr/bin/g++ and qmake is /usr/lib/x86_64-linux-gnu/qt5/bin/qmakeResult: Compile Error. Showing the message:
../analogclock/analogclock.cpp:51:21: fatal error: QtWidgets: No such file or directory
compilation terminated.To solve this issue, I used #include <QWidget> instead of #include <QtWidgets>
and in .pro file
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgetsadded instead of
QT += widgetsNow it is compiled successfully. But running not working. (running symbol not getting in Green color)
Case 2: I selected Qt 5.8.0(qt-everywhere-opensource-src-5.8.0) in projects, qmake is /home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake, in this case, I don't know, in which location the compiler is. So I selected the /usr/bin/g++ itself.
It is showing the following error.
Project ERROR: /home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/examples/widgets/widgets/analogclock/analogclock.pro installs target to unexpected location.By using the absolute path of qmake
Result
/home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake calculator.pro
(successfully completed)
/home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake
(successfully completed)
make
(successfully completed)
./calculatorPlease help me in solving this problem.
Thanks in advance for the help.Thanks & Regards,
Sajeevan.K -
-
Hi Jsulm,
By mistake, I submitted before completing the mail. Mail continues..
By using the absolute path of qmake
Result
/home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake calculator.pro
(successfully completed)
/home/sajeevank/Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake
(successfully completed)
make
(successfully completed)
./calculator
(fails,showing exec error)
But this was working in embedded target board.But I tried another application example as my requirement is a 3d drawing - qt-everywhere-opensource-src-5.8.0/qt3d/examples/qt3d/basicshapes-cpp.
But it is showing the "Unknown module(s) in QT" error.Please provide help in coming out of this issues.
Thanks & Regards,
Sajeevan.KThanks & Regards,
Sajeevan.K -
Hi,
Since you have built Qt yourself, what parameters did you pass to it ?
-
Hi Gaist,
Thank You for the reply.
My build configuration is as follows
./configure -platform linux-g++ -xplatform linux-arm-linaro-g++ -release -device linux-beagleboard-g++
-sysroot /opt/sysroot-eglibc-linaro-2017.01-arm-linux-gnueabihf/
-prefix ~/QtForBBB
-device-option CROSS_COMPILE=/opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
-qt-xcb
-nomake tests -nomake examples -no-openglAnd qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/linux-arm-linaro-g++/qmake.conf is as follows
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)QMAKE_CC = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
QMAKE_CXX = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
QMAKE_LINK = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
QMAKE_AR = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar
QMAKE_OBJCOPY = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-objcopy
QMAKE_STRIP = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip
load(qt_config)
I tried to configure by removing -no opengl option. But then configuration is failed. And error message is as shown below.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.Check config.log for details.
Also I have an opengl application which is finely working in QtCreator, when I am selecting "desktop" in Projects window.
The same application when I am building with "BBB"(for cross compiling Beaglebone Black) in Projects window, it is showing the following error.Project ERROR: Unknown module(s) in QT: opengl
10:05:06: The process "/opt/sysroot-eglibc-linaro-2017.01-arm-linux-gnueabihf/home/sajeevank/QtForBBB/bin/qmake" exited with code 3.In short, the problem I am facing now is Opengl application which is finely working with desktop is not working in Beaglebone Black.
Please suggest the work around.
Thank You in advance for the help.
Thanks & Regards,
Sajeevan.K -
Is it me or are you trying to run a Qt3D application with a Qt version where you are explicitly disabling OpenGL ?
-
Hi Gaist,
Earlier I did that as per some online guides. At that time I did not require OpenGL. But now when I remove it, it is showing the following error messages
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.Check config.log for details.
Thanks in advance for the help.
Thanks & Regards,
Sajeevan.K -
You should use your BBB sysroot as it should contain everything needed for OpenGL.
-
Hi Gaist,
Thank You for the reply. I am using the sysroot - "sysroot-eglibc-linaro-2017.01-arm-linux-gnueabihf", which I got from https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/. I am not sure whether it is a sysroot with installed OpenGL ES packages. I explored in this sysroot directory. I couldn't find an opengl or gl directory or file. Does this sysroot really contains OpenGL ES packages?
Also how should I modify ~/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/linux-arm-linaro-g++/qmake.conf
to include QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2]. Is it as shown below?QMAKE_INCDIR_OPENGL[_ES2] = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/include
QMAKE_LIBDIR_OPENGL[_ES2] = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/lib
QMAKE_LIBS_OPENGL[_ES2] = /opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/libWhen I do it as above I am getting the following error messages.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
ERROR: Feature 'opengl' was enabled, but the pre-condition 'features.opengl-desktop || features.opengl-dynamic || features.opengles2' failed.
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.Check config.log for details.
Thanks in advance for the help,
Thanks & Regards,
Sajeevan.K -
Like I wrote before: use a sysroot made for the BBB. Linaro provides a generic sysroot. The device producer usually provide their own with everything needed to access their specialised hardware. That's not the role of Linaro.
-
Hi Gaist,
Thank You very much for the reply. I will move in that direction.
Thanks & Regards,
Sajeevan.K