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. qt3d not working on RaspberryPi2 (Missing main function for shader)
Forum Update on Monday, May 27th 2025

qt3d not working on RaspberryPi2 (Missing main function for shader)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 4 Posters 2.3k 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.
  • B Offline
    B Offline
    BuTbKa
    wrote on 2 Apr 2016, 14:20 last edited by
    #1

    Hello. I was cross-compiling qt5.6 for RaspberryPi2, then I was compiled some examples from qt3d directory (plasma and cpp-example) copy to RPI2 and when try to run had error:
    pi@raspberrypi:~ $ ./cpp_example

    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    QOpenGLShader::link: "ERROR:LEX/PARSE-1 (fragment shader, line 40) Syntax error"
    Failed to link shader program: "ERROR:LEX/PARSE-1 (fragment shader, line 40) Syntax error"
    QOpenGLShader::link: "ERROR:LINK-9 (link time, line -1) Missing main function for shader"
    QOpenGLShader::link: "ERROR:LINK-9 (link time, line -1) Missing main function for shader"
    ...
    

    I was try qt5.7 from git and has same error. Canvas3D and QML 2D Shaders work fine.
    How I can fix it?

    D 1 Reply Last reply 20 Dec 2016, 06:11
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Apr 2016, 23:01 last edited by
      #2

      Hi and welcome to devnet,

      Since Qt3D is still TP, I'd recommend posting this question on the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

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

      D 1 Reply Last reply 21 Dec 2016, 06:04
      0
      • B BuTbKa
        2 Apr 2016, 14:20

        Hello. I was cross-compiling qt5.6 for RaspberryPi2, then I was compiled some examples from qt3d directory (plasma and cpp-example) copy to RPI2 and when try to run had error:
        pi@raspberrypi:~ $ ./cpp_example

        Unable to query physical screen size, defaulting to 100 dpi.
        To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
        QOpenGLShader::link: "ERROR:LEX/PARSE-1 (fragment shader, line 40) Syntax error"
        Failed to link shader program: "ERROR:LEX/PARSE-1 (fragment shader, line 40) Syntax error"
        QOpenGLShader::link: "ERROR:LINK-9 (link time, line -1) Missing main function for shader"
        QOpenGLShader::link: "ERROR:LINK-9 (link time, line -1) Missing main function for shader"
        ...
        

        I was try qt5.7 from git and has same error. Canvas3D and QML 2D Shaders work fine.
        How I can fix it?

        D Offline
        D Offline
        Diracsbracket
        wrote on 20 Dec 2016, 06:11 last edited by
        #3

        @BuTbKa
        Hi, I'm having the same problem. Have you managed to solve it? I didn't find a repost of your message in a different category as suggested by the moderator, so I ask it here.

        J 1 Reply Last reply 20 Dec 2016, 07:27
        0
        • D Diracsbracket
          20 Dec 2016, 06:11

          @BuTbKa
          Hi, I'm having the same problem. Have you managed to solve it? I didn't find a repost of your message in a different category as suggested by the moderator, so I ask it here.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 20 Dec 2016, 07:27 last edited by
          #4

          @Diracsbracket @SGaist meant http://lists.qt-project.org/mailman/listinfo/interest (mailing list) not another forum category.

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

          D 1 Reply Last reply 20 Dec 2016, 07:41
          0
          • J jsulm
            20 Dec 2016, 07:27

            @Diracsbracket @SGaist meant http://lists.qt-project.org/mailman/listinfo/interest (mailing list) not another forum category.

            D Offline
            D Offline
            Diracsbracket
            wrote on 20 Dec 2016, 07:41 last edited by Diracsbracket
            #5

            @jsulm
            OK. Got it.
            Just was hoping for a reaction of the original poster, but he hasn't been active here as of lately.
            Cheerio.

            1 Reply Last reply
            0
            • S SGaist
              7 Apr 2016, 23:01

              Hi and welcome to devnet,

              Since Qt3D is still TP, I'd recommend posting this question on the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

              D Offline
              D Offline
              Diracsbracket
              wrote on 21 Dec 2016, 06:04 last edited by
              #6

              @SGaist
              What do you mean, "More user oriented" ? Isn't Qt a DEVELOPMENT platform, and does't this forum have a "Qt Development" subgroup?. If one of the Qt-provided examples does not work, then this is a user (and usage) problem after all. Some of the qt3d examples don't work on either PC and Pi2 (Pi2 with EGLFS).

              J 1 Reply Last reply 21 Dec 2016, 07:14
              0
              • D Diracsbracket
                21 Dec 2016, 06:04

                @SGaist
                What do you mean, "More user oriented" ? Isn't Qt a DEVELOPMENT platform, and does't this forum have a "Qt Development" subgroup?. If one of the Qt-provided examples does not work, then this is a user (and usage) problem after all. Some of the qt3d examples don't work on either PC and Pi2 (Pi2 with EGLFS).

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 21 Dec 2016, 07:14 last edited by
                #7

                @Diracsbracket @SGaist meant: this forum is for people using Qt not developing Qt.

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

                D 1 Reply Last reply 21 Dec 2016, 07:18
                0
                • J jsulm
                  21 Dec 2016, 07:14

                  @Diracsbracket @SGaist meant: this forum is for people using Qt not developing Qt.

                  D Offline
                  D Offline
                  Diracsbracket
                  wrote on 21 Dec 2016, 07:18 last edited by
                  #8

                  @jsulm
                  What do you mean? How can you use Qt without developing? Do you mean that this forum is only for users of apps written in Qt??

                  J 1 Reply Last reply 21 Dec 2016, 07:21
                  0
                  • D Diracsbracket
                    21 Dec 2016, 07:18

                    @jsulm
                    What do you mean? How can you use Qt without developing? Do you mean that this forum is only for users of apps written in Qt??

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 21 Dec 2016, 07:21 last edited by
                    #9

                    @Diracsbracket There are developers who develop Qt itself. Then there are people who use Qt to develop applications with it. This forum is for developers who use Qt for their projects. If you want to contact developers who develop Qt then you should use the mailing list.

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

                    D 1 Reply Last reply 21 Dec 2016, 07:28
                    2
                    • J jsulm
                      21 Dec 2016, 07:21

                      @Diracsbracket There are developers who develop Qt itself. Then there are people who use Qt to develop applications with it. This forum is for developers who use Qt for their projects. If you want to contact developers who develop Qt then you should use the mailing list.

                      D Offline
                      D Offline
                      Diracsbracket
                      wrote on 21 Dec 2016, 07:28 last edited by Diracsbracket
                      #10

                      @jsulm
                      OK. Thanks for clarifying this. Sometimes, I'm a little bit slow...^^
                      In any case, reporting a problem like this seems perfectly valid to me, from a "user" point of view.
                      Cheers.

                      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