Giter VIP home page Giter VIP logo

Comments (17)

jjordantb avatar jjordantb commented on May 30, 2024 10

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.

Lurkki14 avatar Lurkki14 commented on May 30, 2024

Does changing that include to just <QX11Info> make any difference?

from tuxclocker.

Batcastle avatar Batcastle commented on May 30, 2024

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.

Lurkki14 avatar Lurkki14 commented on May 30, 2024

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.

Batcastle avatar Batcastle commented on May 30, 2024

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.

Lurkki14 avatar Lurkki14 commented on May 30, 2024

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.

Batcastle avatar Batcastle commented on May 30, 2024

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.

Batcastle avatar Batcastle commented on May 30, 2024

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.

hunterkepley avatar hunterkepley commented on May 30, 2024

@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.

Macribit avatar Macribit commented on May 30, 2024

if you are on opensuse you need

libqt5-creator
and
libqt5-qttools-devel

and use qmake-qt5 command instead of qmake

from tuxclocker.

RazrFalcon avatar RazrFalcon commented on May 30, 2024

@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.

DeepInThought avatar DeepInThought commented on May 30, 2024

issue #5 Comment-461656164 @jjordantb This worked like a charm on Ubuntu Disco, that you sir!

from tuxclocker.

 avatar commented on May 30, 2024

@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.

How would I do this on Manjaro?

from tuxclocker.

viggy96 avatar viggy96 commented on May 30, 2024

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.

dpanter avatar dpanter commented on May 30, 2024

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.

JMadgwick avatar JMadgwick commented on May 30, 2024

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.

jomarocas avatar jomarocas commented on May 30, 2024

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.

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.