Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error while making example fille
Forum Updated to NodeBB v4.3 + New Features

Error while making example fille

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 229 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.
  • F Offline
    F Offline
    ferocito
    wrote on last edited by
    #1

    Hey,
    I need to use Qt for a school project, so I downloaded the 6.4.2 version and tried to build the example project the teacher gave us, but I struggled with this error :

    ./glwidget.h:3:10: fatal error: 'QOpenGLWidget' file not found
    

    Note that the error is related to a

    #include  <QOpenGLWidget>  
    

    in a .h file of the project.

    I succeed to resolve this error by adding

    INCLUDEPATH += /path/to/header/file
    

    to the .pro file, but another error came up :

    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1
    

    I tried to add this (with ChatGPT help) on the .pro file :

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 12.5
    QMAKE_APPLE_DEVICE_ARCHS = arm64
    LIBS += -framework QtWidgets -framework QtOpenGL
    

    but it didn't change anything...

    When changing arm64 to x86_64, same error :

    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1
    

    In my despair, I tried to build one of the examples the 6.4.2 Qt version provides :

    cd /path/to/Qt/examples/6.4.2/widgets/tools/plugandpaint/app
    qmake
    make -config release
    

    And as i was expecting, another error :

    ld: library not found for -lpnp_basictools
    clang: error: linker command failed with exit code 1
    

    I have

    QT += openglwidgets
    

    in my .pro file, so the problem is not related to this.

    After hours spent on ChatGPT and hours trying to explain my problem to the course assistants, this forum is my last hope before resetting my Mac.

    If this can help, I'm on a M2 Macbook Air, version 12.5.

    Thank you if you made it this far, hope someone will be able to help me.

    jsulmJ 1 Reply Last reply
    0
    • F ferocito

      Hey,
      I need to use Qt for a school project, so I downloaded the 6.4.2 version and tried to build the example project the teacher gave us, but I struggled with this error :

      ./glwidget.h:3:10: fatal error: 'QOpenGLWidget' file not found
      

      Note that the error is related to a

      #include  <QOpenGLWidget>  
      

      in a .h file of the project.

      I succeed to resolve this error by adding

      INCLUDEPATH += /path/to/header/file
      

      to the .pro file, but another error came up :

      ld: symbol(s) not found for architecture arm64
      clang: error: linker command failed with exit code 1
      

      I tried to add this (with ChatGPT help) on the .pro file :

      QMAKE_MACOSX_DEPLOYMENT_TARGET = 12.5
      QMAKE_APPLE_DEVICE_ARCHS = arm64
      LIBS += -framework QtWidgets -framework QtOpenGL
      

      but it didn't change anything...

      When changing arm64 to x86_64, same error :

      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1
      

      In my despair, I tried to build one of the examples the 6.4.2 Qt version provides :

      cd /path/to/Qt/examples/6.4.2/widgets/tools/plugandpaint/app
      qmake
      make -config release
      

      And as i was expecting, another error :

      ld: library not found for -lpnp_basictools
      clang: error: linker command failed with exit code 1
      

      I have

      QT += openglwidgets
      

      in my .pro file, so the problem is not related to this.

      After hours spent on ChatGPT and hours trying to explain my problem to the course assistants, this forum is my last hope before resetting my Mac.

      If this can help, I'm on a M2 Macbook Air, version 12.5.

      Thank you if you made it this far, hope someone will be able to help me.

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

      @ferocito Please don't double post!
      You already asked exact same question here: https://forum.qt.io/topic/143314/error-while-making-example-file?_=1677748372737

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

      1 Reply Last reply
      1
      • SGaistS SGaist locked this topic on

      • Login

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