Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to compile when using QCustomPlot

Unable to compile when using QCustomPlot

Scheduled Pinned Locked Moved Unsolved General and Desktop
qcustomplotdesktopqgenericmatrixmsvc2019qt creator
2 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JPolo
    wrote on last edited by
    #1

    Hi,
    I want to use QCustomPlot in order to plot some data in a mainwindow. In order to do that, I follow the basic tutorial found here. Every thing seems to work, until I decide to include any custom header in the header of the module that has the promoted widget. Let's say that this module is called mainWindow and I want to include the custom file "myDataClasses.h" in the header of mainWindow:

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    
    #include <QMainWindow>
    #include "myDataClasses.h" // custom header that causes problem
    
    QT_BEGIN_NAMESPACE
    namespace Ui { class MainWindow; }
    QT_END_NAMESPACE
    .
    .
    .
    

    If I try to compile the program, no matter what custom header I include in mainwindow.h, I get a bunch of errors that I don't understand regarding the qgenericmatrix.h module as you can see in the image below.

    2db3061a-36e7-4f59-9230-04f4a1d70ce6-image.png

    Can someone give me a clue of what is going on? It used to work before... I use Qt Creator 4.15.0 based on Qt 5.15.2 MSVC2019.

    Thanks in advance for your help!

    jsulmJ 1 Reply Last reply
    0
    • J JPolo

      Hi,
      I want to use QCustomPlot in order to plot some data in a mainwindow. In order to do that, I follow the basic tutorial found here. Every thing seems to work, until I decide to include any custom header in the header of the module that has the promoted widget. Let's say that this module is called mainWindow and I want to include the custom file "myDataClasses.h" in the header of mainWindow:

      #ifndef MAINWINDOW_H
      #define MAINWINDOW_H
      
      #include <QMainWindow>
      #include "myDataClasses.h" // custom header that causes problem
      
      QT_BEGIN_NAMESPACE
      namespace Ui { class MainWindow; }
      QT_END_NAMESPACE
      .
      .
      .
      

      If I try to compile the program, no matter what custom header I include in mainwindow.h, I get a bunch of errors that I don't understand regarding the qgenericmatrix.h module as you can see in the image below.

      2db3061a-36e7-4f59-9230-04f4a1d70ce6-image.png

      Can someone give me a clue of what is going on? It used to work before... I use Qt Creator 4.15.0 based on Qt 5.15.2 MSVC2019.

      Thanks in advance for your help!

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @JPolo said in Unable to compile when using QCustomPlot:

      I use Qt Creator 4.15.0 based on Qt 5.15.2 MSVC2019

      That is not necesserilly Qt version you're using (this is the Qt version used to build QtCreator).
      What Qt version did you install?

      What is the first error message?
      Did you do what the tutorial suggests: "To use the shared library in your application, set the define QCUSTOMPLOT_USE_LIBRARY before including the QCustomPlot header."?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved