Comments (17)
I had this issue, here's what I had to do to fix it.
First I had to modify rojekti.pro change
QT += core gui
to
QT += core gui x11extras
Then I had to install libqt5x11extras5-dev with sudo apt install libqt5x11extras5-dev
Then for another reason I was missing NVCtrl.h so I had to sudo apt install libxnvctrl-dev
Hope this helps.
from tuxclocker.
Does changing that include to just <QX11Info> make any difference?
from tuxclocker.
Doing that gives this error:
In file included from main.cpp:1:0:
mainwindow.h:169:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *gputemp = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:170:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *powerdraw = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:171:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *voltage = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:172:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *coreclock = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:173:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *memclock = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:174:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *coreutil = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:175:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *memutil = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:176:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *fanspeed = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:177:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *memusage = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:178:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *curmaxclk = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:179:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *curmaxmemclk = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:180:5: error: ‘QTreeWidgetItem’ does not name a type; did you mean ‘QWidgetItem’?
QTreeWidgetItem *curpowerlim = new QTreeWidgetItem;
^~~~~~~~~~~~~~~
QWidgetItem
mainwindow.h:184:5: error: ‘QScrollArea’ does not name a type
QScrollArea *plotScrollArea = new QScrollArea;
^~~~~~~~~~~
mainwindow.h:185:5: error: ‘QVBoxLayout’ does not name a type; did you mean ‘QCPLayout’?
QVBoxLayout *lo = new QVBoxLayout;
^~~~~~~~~~~
QCPLayout
mainwindow.h:187:5: error: ‘QVBoxLayout’ does not name a type; did you mean ‘QCPLayout’?
QVBoxLayout *plotLayout = new QVBoxLayout;
^~~~~~~~~~~
QCPLayout
mainwindow.h:207:9: error: ‘QVBoxLayout’ does not name a type; did you mean ‘QCPLayout’?
QVBoxLayout *layout;
^~~~~~~~~~~
QCPLayout
Makefile:280: recipe for target 'main.o' failed
make: *** [main.o] Error 1
I tried putting one include on one line and the other (so QtX11Extras on the first line and QX11Info on the next) and got this error:
In file included from mainwindow.h:10:0,
from main.cpp:1:
nvidia.h:6:10: fatal error: QtX11Extras: No such file or directory
#include <QtX11Extras>
^~~~~~~~~~~~~
compilation terminated.
Makefile:280: recipe for target 'main.o' failed
make: *** [main.o] Error 1
from tuxclocker.
Looks like the compiler is trying to build against Qt 4 libraries. Check that you have a recent version of Qt 5 and make it use that.
from tuxclocker.
Alright. I made sure to have Qt 5 installed. Went to run it again, with the file the way it was initially, it seems to have gotten farther along, but still threw an error. A different one though:
In file included from mainwindow.cpp:2:0:
ui_mainwindow.h:13:10: fatal error: QtGui/QAction: No such file or directory
#include <QtGui/QAction>
^~~~~~~~~~~~~~~
compilation terminated.
Makefile:481: recipe for target 'mainwindow.o' failed
make: *** [mainwindow.o] Error 1
from tuxclocker.
There's still probably some outdated libraries it's trying to use considering that that file doesn't exist in the Qt 5 include folder but does in the Qt 4 one.
from tuxclocker.
I tried removing all Qt4 libs from my system that I didn't need and got the new error again. Is there some other way to make it use the new libs? I'm don't compile code that often and have never dealt with Qt on this end of things before so I am lost. Lol
Sorry for causing so much trouble, thank you for the help!
from tuxclocker.
Alright. I made sure to have Qt 5 installed. Went to run it again, with the file the way it was initially, it seems to have gotten farther along, but still threw an error. A different one though:
In file included from mainwindow.cpp:2:0: ui_mainwindow.h:13:10: fatal error: QtGui/QAction: No such file or directory #include <QtGui/QAction> ^~~~~~~~~~~~~~~ compilation terminated. Makefile:481: recipe for target 'mainwindow.o' failed make: *** [mainwindow.o] Error 1
I tried the fix you did @jjordantb but the same error as what I have quoted above.
Is it possible that it's doing this cause I'm on a GTK based system and not Qt based? I find it unlikely that could cause it not to work but it may be possible. I don't know.
from tuxclocker.
@Batcastle Try #include <QApplication>
instead of #include <QtGui/QAction>
after adding QT += widgets
to your .pro
file. That fixed it on a friend's system
from tuxclocker.
if you are on opensuse you need
libqt5-creator
and
libqt5-qttools-devel
and use qmake-qt5 command instead of qmake
from tuxclocker.
@guglovich Same problem on Gentoo. Looks like x11-drivers/nvidia-drivers
doesn't provide any headers at all.
UPD: on Gentoo it can be fixed by enabling the tools
and static-libs
use-flags. Details.
from tuxclocker.
issue #5 Comment-461656164 @jjordantb This worked like a charm on Ubuntu Disco, that you sir!
from tuxclocker.
@guglovich Same problem on Gentoo. Looks like
x11-drivers/nvidia-drivers
doesn't provide any headers at all.
UPD: on Gentoo it can be fixed by enabling the
tools
andstatic-libs
use-flags. Details.
How would I do this on Manjaro?
from tuxclocker.
I've got exactly the same error as @Batcastle , and @jjordantb's suggestion didn't work for me. I'm running Ubuntu 18.04. I've got the qt5 libraries installed.
from tuxclocker.
Hi, got a build error in Debian sid.
/usr/bin/ld: cannot find -lnvidia-ml
Guess I didn't have the proper .so file for some reason, but it was easily fixed.
ln -s /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 /usr/lib/x86_64-linux-gnu/libnvidia-ml.so
Make then completed successfully.
Cheers!
from tuxclocker.
I was also having problems and found that I needed this package: libqt5x11extras5-dev
I also needed to run qmake -qt=5 rojekti.pro
and not just qmake
. My system (Ubuntu 18.04) didn't have qmake-qt5
. It turned out that for me qmake
was a symlink to qtchooser
in qt4 mode and not qt5. Adding the -qt=5
fixed the problem of qt4 libraries being used.
It might also have been important to run make clean
in between attempts at running qmake and building.
from tuxclocker.
I had this issue, here's what I had to do to fix it.
First I had to modify rojekti.pro change
QT += core gui
to
QT += core gui x11extras
Then I had to install libqt5x11extras5-dev with
sudo apt install libqt5x11extras5-dev
Then for another reason I was missing NVCtrl.h so I had tosudo apt install libxnvctrl-dev
Hope this helps.
thanks in order to install to ubuntu 20.04
i install
sudo apt install libxnvctrl
sudo apt-get install qt5-default
sudo apt-get install libqt5x11extras5-dev
sudo apt install libxnvctrl-dev
and later make and sudo make install
from tuxclocker.
Related Issues (20)
- Voltage Control on GTX 1060 6GB Greyed Out HOT 1
- Ubuntu 20.04 installation error HOT 1
- Needing nvidia packages for amd gpu to make. HOT 2
- Custom fan speed curve applies only to 1 fan on Gigabyte Gaming OC RTX 3080 card HOT 1
- Everything is grayed out except power limit HOT 1
- Unable to adjust HOT 2
- Segmentation fault HOT 5
- Theres only an AUR package for nvidia version, where is it for amd? HOT 1
- Rearrange Graph Monitor Items HOT 1
- Can Only Control Power Limit HOT 2
- Make not finding nvidia libs in an AMD installation on Fedora. HOT 2
- [README.md] installation instructions - is 'pstatetest' (2019) still the latest usable branch?
- Compress releases HOT 1
- ninja: build stopped: subcommand failed HOT 8
- Ninja build failure HOT 2
- CUDA build dependency is unacceptable HOT 3
- No Nvidia functionality available on Wayland HOT 27
- NVML can't be initialized in the release build HOT 17
- [Proporsal] Add desktop icon finally HOT 3
- FR: Remove requirement for libraries to be installed, just to build the application HOT 51
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuxclocker.