Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Undefined reference to 'QRasterPaintEngine::QRasterPaintEngine(QPaintDevice*)'
Forum Updated to NodeBB v4.3 + New Features

Undefined reference to 'QRasterPaintEngine::QRasterPaintEngine(QPaintDevice*)'

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 1.7k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    sachintm
    wrote on last edited by
    #1

    Hello All,

    I am trying to use the QRasterPaintEngine to do painting operations for my project on "Qt for Embedded Linux", and getting a linking error to QRasterPaintEngine implementation.

    Initially, I got the error " QRasterPaintEngine : No such file or error ", So I changed the include path to absolute path to the header files, like below

    #include "/mydir/qt-everywhere-opensource-src-4.8.5/include/QtGui/private/qpaintengine_raster_p.h"

    So, the compilation is working fine, but while linking it is giving the error as,

    " undefined reference to 'QRasterPaintEngine::QRasterPaintEngine(QPaintDevice*)' ".

    Please suggest me how to resolve the linking error.

    Thanks in advance,
    Sachin

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sachintm
      wrote on last edited by
      #2

      I have implemented a sample code for this.

      header file "srasterpaintengine.h" looks like this.

      @#ifndef SRASTERPAINTENGINE_H
      #define SRASTERPAINTENGINE_H

      #include <private/qpaintengine_raster_p.h>

      class SRasterPaintEngine : public QObject

      {

      public:
      SRasterPaintEngine( QPaintDevice *device );
      ~SRasterPaintEngine();

      private:
      QRasterPaintEngine *raster_engine;

      };

      #endif // SRASTERPAINTENGINE_H
      @

      and the source file "srasterpaintengine.cpp" looks like below.

      @#include "srasterpaintengine.h"

      SRasterPaintEngine::SRasterPaintEngine(QPaintDevice *device):raster_engine(0)
      {
      raster_engine = new QRasterPaintEngine(device);
      }

      SRasterPaintEngine::~SRasterPaintEngine()
      {
      if(raster_engine)
      delete raster_engine;
      }
      @

      So, when I compiled this code, I am getting the linking error.
      Please suggest how to get it working.

      Thanks,
      Sachin

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You know that you are trying to use private API's that are officially not to be used ?

        That said, what do you need to paint that would require modification to the raster paint engine ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sachintm
          wrote on last edited by
          #4

          Hi,

          Thanks for replying,

          I am trying to hook my own GPU into the "Qt for Embedded Linux" and implement the few set of graphics operations.

          Yes, I know I am using the private APIs, I am working on POCs for this.
          Please suggest, if there are any other ways to do it.

          Thanks,
          Sachin

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            In that case, you should rather integrate your code directly in Qt, that would allow you to use the private APIs directly

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - 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