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. WiringPi build error
Forum Updated to NodeBB v4.3 + New Features

WiringPi build error

Scheduled Pinned Locked Moved Solved Installation and Deployment
35 Posts 2 Posters 17.8k 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.
  • T this

    @jsulm ![alt text](image url)0_1500020449778_capture2017-07-14 17-15-11.png

    Do you need more information?

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

    @this Yes, I need the build log ("Compile Output" tab in QtCreator)

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

    T 1 Reply Last reply
    0
    • jsulmJ jsulm

      @this Yes, I need the build log ("Compile Output" tab in QtCreator)

      T Offline
      T Offline
      this
      wrote on last edited by this
      #15

      @jsulm ![alt text](image url)0_1500020738334_capture, 2017-07-14 17-24-01.png

      I am cross compiling Linux (ubuntu) to raspberrypi.

      jsulmJ 1 Reply Last reply
      0
      • T this

        @jsulm ![alt text](image url)0_1500020738334_capture, 2017-07-14 17-24-01.png

        I am cross compiling Linux (ubuntu) to raspberrypi.

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

        @this The lib is EABI5: "ELF 32-bit LSB shared object, ARM, EABI5". I think RPi uses EABI7 or something. From where did you get the lib?

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

        T 1 Reply Last reply
        0
        • jsulmJ jsulm

          @this The lib is EABI5: "ELF 32-bit LSB shared object, ARM, EABI5". I think RPi uses EABI7 or something. From where did you get the lib?

          T Offline
          T Offline
          this
          wrote on last edited by
          #17

          @jsulm I'm sorry, but I do not know what lib is.
          I can not understand your words.
          Are you referring to qt lib?
          Are you talking raspberrypi?

          We have installed cross compile environment by referring to the following site.
          https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c

          jsulmJ 1 Reply Last reply
          0
          • T this

            @jsulm I'm sorry, but I do not know what lib is.
            I can not understand your words.
            Are you referring to qt lib?
            Are you talking raspberrypi?

            We have installed cross compile environment by referring to the following site.
            https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c

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

            @this I'm talking about libwiringPi.so
            How did you install this lib? Was it part of this cross compiling environment or did you get it from somewhere else?

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

            T 1 Reply Last reply
            0
            • jsulmJ jsulm

              @this I'm talking about libwiringPi.so
              How did you install this lib? Was it part of this cross compiling environment or did you get it from somewhere else?

              T Offline
              T Offline
              this
              wrote on last edited by this
              #19

              @jsulm I am sorry.
              Installed.
              The installation process is as follows:

              git clone git://git.drogon.net/wiringPi
              cd wiringPi/
              git pull origin
              ./build

              At first we installed wiringPi from ubuntu pc.
              However, I got the error like above and installed raspberrypi in the same way.

              jsulmJ 1 Reply Last reply
              0
              • T this

                @jsulm I am sorry.
                Installed.
                The installation process is as follows:

                git clone git://git.drogon.net/wiringPi
                cd wiringPi/
                git pull origin
                ./build

                At first we installed wiringPi from ubuntu pc.
                However, I got the error like above and installed raspberrypi in the same way.

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

                @this Sorry can you explain this: "At first we installed wiringPi from ubuntu pc.
                However, I got the error like above and installed raspberrypi in the same way."

                Do you mean you built it on the RaspberryPi and copied then to your Ubuntu PC?
                You should build it on your Ubuntu machine, but use the cross compilation environment.

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

                T 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @this Sorry can you explain this: "At first we installed wiringPi from ubuntu pc.
                  However, I got the error like above and installed raspberrypi in the same way."

                  Do you mean you built it on the RaspberryPi and copied then to your Ubuntu PC?
                  You should build it on your Ubuntu machine, but use the cross compilation environment.

                  T Offline
                  T Offline
                  this
                  wrote on last edited by
                  #21

                  @jsulm Well ... you seem to have misunderstood.
                  The build is ubuntu -> raspberrypi. (Cross compile)

                  I have been struggling to eliminate the errors that have occurred.

                  I first installed wiringPi via the terminal from ubuntu pc.

                  However, I thought that a file not recognized error occurred and there was no file in raspberrypi.

                  So raspberrypi installed wiringPi through the terminal.
                  So I installed wiringPi related files in raspberrypi's / usr / local / lib folder.

                  I thought this was the cause of the error.

                  However, as you know, the error was not resolved and the question was raised

                  jsulmJ 1 Reply Last reply
                  0
                  • T this

                    @jsulm Well ... you seem to have misunderstood.
                    The build is ubuntu -> raspberrypi. (Cross compile)

                    I have been struggling to eliminate the errors that have occurred.

                    I first installed wiringPi via the terminal from ubuntu pc.

                    However, I thought that a file not recognized error occurred and there was no file in raspberrypi.

                    So raspberrypi installed wiringPi through the terminal.
                    So I installed wiringPi related files in raspberrypi's / usr / local / lib folder.

                    I thought this was the cause of the error.

                    However, as you know, the error was not resolved and the question was raised

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

                    @this I know that you're cross compiling.
                    "However, I thought that a file not recognized error occurred and there was no file in raspberrypi." - for cross compilation it doesn't matter whether the lib is on RaspberryPi or not as you're building on your Ubuntu machine - you need it on your Ubuntu machine.
                    So, on your Ubuntu machine the lib is this: /usr/local/lib/libwiringPi.so (symbolic link) and /usr/local/lib/libwiringPi.so.2.44 (lib itself), right?

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

                    T 2 Replies Last reply
                    0
                    • jsulmJ jsulm

                      @this I know that you're cross compiling.
                      "However, I thought that a file not recognized error occurred and there was no file in raspberrypi." - for cross compilation it doesn't matter whether the lib is on RaspberryPi or not as you're building on your Ubuntu machine - you need it on your Ubuntu machine.
                      So, on your Ubuntu machine the lib is this: /usr/local/lib/libwiringPi.so (symbolic link) and /usr/local/lib/libwiringPi.so.2.44 (lib itself), right?

                      T Offline
                      T Offline
                      this
                      wrote on last edited by this
                      #23
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @this I know that you're cross compiling.
                        "However, I thought that a file not recognized error occurred and there was no file in raspberrypi." - for cross compilation it doesn't matter whether the lib is on RaspberryPi or not as you're building on your Ubuntu machine - you need it on your Ubuntu machine.
                        So, on your Ubuntu machine the lib is this: /usr/local/lib/libwiringPi.so (symbolic link) and /usr/local/lib/libwiringPi.so.2.44 (lib itself), right?

                        T Offline
                        T Offline
                        this
                        wrote on last edited by this
                        #24

                        @jsulm I solved the above error.
                        LIBS += -L/usr/local/lib-lwiringPi
                        I made a mistake in the spacing.
                        However, a new error has occurred.
                        Is this what I am doing wrong?
                        I wrote the following in .pro.
                        INCLUDEPATH + = / usr / local / include
                        LIBS += -L/usr/local/lib-lwiringPi

                        ![alt text](0_1500250620685_스크린샷, 2017-07-17 09-16-38.png image url)

                        ![alt text](0_1500250727583_스크린샷, 2017-07-17 08-44-26.png image url)

                        T 1 Reply Last reply
                        0
                        • T this

                          @jsulm I solved the above error.
                          LIBS += -L/usr/local/lib-lwiringPi
                          I made a mistake in the spacing.
                          However, a new error has occurred.
                          Is this what I am doing wrong?
                          I wrote the following in .pro.
                          INCLUDEPATH + = / usr / local / include
                          LIBS += -L/usr/local/lib-lwiringPi

                          ![alt text](0_1500250620685_스크린샷, 2017-07-17 09-16-38.png image url)

                          ![alt text](0_1500250727583_스크린샷, 2017-07-17 08-44-26.png image url)

                          T Offline
                          T Offline
                          this
                          wrote on last edited by this
                          #25

                          @this I got the above error and I deleted wiringPi and reinstalled it.
                          However, the following error occurs during installation.

                          Is this the problem that caused this error?

                          //////////////////////////////////////////////////////////////////////////////////////////////////////////
                          root@smart-HP-Z400-Workstation:~/wiringPi# ./build
                          wiringPi Build script

                          WiringPi Library
                          [UnInstall]
                          [Compile] wiringPi.c
                          [Compile] wiringSerial.c
                          [Compile] piHiPri.c
                          [Compile] wiringShift.c
                          [Compile] piThread.c
                          wiringSerial.c: In function ‘serialPutchar’:
                          wiringSerial.c:158:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                          write (fd, &c, 1) ;
                          ^
                          wiringSerial.c: In function ‘serialPuts’:
                          wiringSerial.c:170:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                          write (fd, s, strlen (s)) ;
                          ^
                          [Compile] softPwm.c
                          [Compile] wiringPiSPI.c
                          [Compile] wiringPiI2C.c
                          [Compile] softTone.c
                          wiringPi.c:1247:21: warning: ‘digitalRead8Dummy’ defined but not used [-Wunused-function]
                          static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct *no
                          ^
                          wiringPi.c:1248:21: warning: ‘digitalWrite8Dummy’ defined but not used [-Wunused-function]
                          static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct *no
                          ^
                          wiringPi.c: In function ‘digitalRead’:
                          [Compile] mcp23008.c
                          wiringPi.c:1473:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                          read (sysFds [pin], &c, 1) ;
                          ^
                          wiringPi.c: In function ‘digitalWrite’:
                          wiringPi.c:1535:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                          write (sysFds [pin], "0\n", 2) ;
                          ^
                          wiringPi.c:1537:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                          write (sysFds [pin], "1\n", 2) ;
                          ^
                          wiringPi.c: In function ‘waitForInterrupt’:
                          wiringPi.c:1837:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                          (void)read (fd, &c, 1) ; // Read & clear
                          ^
                          wiringPi.c: In function ‘wiringPiISR’:
                          wiringPi.c:1953:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                          read (sysFds [bcmGpioPin], &c, 1) ;
                          ^
                          [Compile] mcp23016.c
                          [Compile] mcp23017.c
                          [Compile] mcp23s08.c
                          [Compile] mcp23s17.c
                          [Compile] sr595.c
                          [Compile] pcf8574.c
                          [Compile] pcf8591.c
                          [Compile] mcp3004.c
                          [Compile] mcp4802.c
                          [Compile] mcp3002.c
                          pcf8591.c: In function ‘myAnalogWrite’:
                          pcf8591.c:44:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                          write (node->fd, b, 2) ;
                          ^
                          [Compile] max31855.c
                          [Compile] mcp3422.c
                          [Compile] max5322.c
                          mcp3422.c: In function ‘waitForConversion’:
                          mcp3422.c:50:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                          read (fd, buffer, n) ;
                          ^
                          [Compile] ads1115.c
                          [Compile] sn3218.c
                          [Compile] bmp180.c
                          [Compile] htu21d.c
                          [Compile] ds18b20.c
                          [Compile] rht03.c
                          [Compile] drcSerial.c
                          [Compile] drcNet.c
                          [Compile] pseudoPins.c
                          [Compile] wpiExtensions.c
                          pseudoPins.c: In function ‘myAnalogRead’:
                          pseudoPins.c:50:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                          int *ptr = (int *)node->data0 ;
                          ^
                          pseudoPins.c: In function ‘myAnalogWrite’:
                          pseudoPins.c:59:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                          int *ptr = (int *)node->data0 ;
                          ^
                          pseudoPins.c: In function ‘pseudoPinsSetup’:
                          pseudoPins.c:89:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                          node->data0 = (unsigned int)ptr ;
                          ^
                          [Link (Dynamic)]
                          [Install Headers]
                          [Install Dynamic Lib]

                          WiringPi Devices Library
                          [UnInstall]
                          [Compile] ds1302.c
                          [Compile] maxdetect.c
                          [Compile] gertboard.c
                          [Compile] piFace.c
                          [Compile] piNes.c
                          [Compile] lcd.c
                          [Compile] lcd128x64.c
                          [Compile] scrollPhat.c
                          [Compile] piGlow.c
                          [Link (Dynamic)]
                          [Install Headers]
                          [Install Dynamic Lib]

                          GPIO Utility
                          [Compile] gpio.c
                          [Compile] readall.c
                          [Compile] pins.c
                          gpio.c: In function ‘doVersion’:
                          gpio.c:1292:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
                          fgets (name, 80, fd) ;
                          ^
                          gpio.c: In function ‘doLoad’:
                          gpio.c:285:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                          system (cmd) ;
                          ^
                          gpio.c:291:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                          system (cmd) ;
                          ^
                          gpio.c: In function ‘doUnLoad’:
                          gpio.c:345:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                          system (cmd) ;
                          ^
                          gpio.c:351:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                          system (cmd) ;
                          ^
                          [Link]
                          [Install]

                          All Done.

                          NOTE: To compile programs with wiringPi, you need to add:
                          -lwiringPi
                          to your compile line(s) To use the Gertboard, MaxDetect, etc.
                          code (the devLib), you need to also add:
                          -lwiringPiDev
                          to your compile line(s).
                          ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                          T 1 Reply Last reply
                          0
                          • T this

                            @this I got the above error and I deleted wiringPi and reinstalled it.
                            However, the following error occurs during installation.

                            Is this the problem that caused this error?

                            //////////////////////////////////////////////////////////////////////////////////////////////////////////
                            root@smart-HP-Z400-Workstation:~/wiringPi# ./build
                            wiringPi Build script

                            WiringPi Library
                            [UnInstall]
                            [Compile] wiringPi.c
                            [Compile] wiringSerial.c
                            [Compile] piHiPri.c
                            [Compile] wiringShift.c
                            [Compile] piThread.c
                            wiringSerial.c: In function ‘serialPutchar’:
                            wiringSerial.c:158:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                            write (fd, &c, 1) ;
                            ^
                            wiringSerial.c: In function ‘serialPuts’:
                            wiringSerial.c:170:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                            write (fd, s, strlen (s)) ;
                            ^
                            [Compile] softPwm.c
                            [Compile] wiringPiSPI.c
                            [Compile] wiringPiI2C.c
                            [Compile] softTone.c
                            wiringPi.c:1247:21: warning: ‘digitalRead8Dummy’ defined but not used [-Wunused-function]
                            static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct *no
                            ^
                            wiringPi.c:1248:21: warning: ‘digitalWrite8Dummy’ defined but not used [-Wunused-function]
                            static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct *no
                            ^
                            wiringPi.c: In function ‘digitalRead’:
                            [Compile] mcp23008.c
                            wiringPi.c:1473:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                            read (sysFds [pin], &c, 1) ;
                            ^
                            wiringPi.c: In function ‘digitalWrite’:
                            wiringPi.c:1535:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                            write (sysFds [pin], "0\n", 2) ;
                            ^
                            wiringPi.c:1537:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                            write (sysFds [pin], "1\n", 2) ;
                            ^
                            wiringPi.c: In function ‘waitForInterrupt’:
                            wiringPi.c:1837:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                            (void)read (fd, &c, 1) ; // Read & clear
                            ^
                            wiringPi.c: In function ‘wiringPiISR’:
                            wiringPi.c:1953:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                            read (sysFds [bcmGpioPin], &c, 1) ;
                            ^
                            [Compile] mcp23016.c
                            [Compile] mcp23017.c
                            [Compile] mcp23s08.c
                            [Compile] mcp23s17.c
                            [Compile] sr595.c
                            [Compile] pcf8574.c
                            [Compile] pcf8591.c
                            [Compile] mcp3004.c
                            [Compile] mcp4802.c
                            [Compile] mcp3002.c
                            pcf8591.c: In function ‘myAnalogWrite’:
                            pcf8591.c:44:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                            write (node->fd, b, 2) ;
                            ^
                            [Compile] max31855.c
                            [Compile] mcp3422.c
                            [Compile] max5322.c
                            mcp3422.c: In function ‘waitForConversion’:
                            mcp3422.c:50:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
                            read (fd, buffer, n) ;
                            ^
                            [Compile] ads1115.c
                            [Compile] sn3218.c
                            [Compile] bmp180.c
                            [Compile] htu21d.c
                            [Compile] ds18b20.c
                            [Compile] rht03.c
                            [Compile] drcSerial.c
                            [Compile] drcNet.c
                            [Compile] pseudoPins.c
                            [Compile] wpiExtensions.c
                            pseudoPins.c: In function ‘myAnalogRead’:
                            pseudoPins.c:50:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                            int *ptr = (int *)node->data0 ;
                            ^
                            pseudoPins.c: In function ‘myAnalogWrite’:
                            pseudoPins.c:59:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                            int *ptr = (int *)node->data0 ;
                            ^
                            pseudoPins.c: In function ‘pseudoPinsSetup’:
                            pseudoPins.c:89:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
                            node->data0 = (unsigned int)ptr ;
                            ^
                            [Link (Dynamic)]
                            [Install Headers]
                            [Install Dynamic Lib]

                            WiringPi Devices Library
                            [UnInstall]
                            [Compile] ds1302.c
                            [Compile] maxdetect.c
                            [Compile] gertboard.c
                            [Compile] piFace.c
                            [Compile] piNes.c
                            [Compile] lcd.c
                            [Compile] lcd128x64.c
                            [Compile] scrollPhat.c
                            [Compile] piGlow.c
                            [Link (Dynamic)]
                            [Install Headers]
                            [Install Dynamic Lib]

                            GPIO Utility
                            [Compile] gpio.c
                            [Compile] readall.c
                            [Compile] pins.c
                            gpio.c: In function ‘doVersion’:
                            gpio.c:1292:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
                            fgets (name, 80, fd) ;
                            ^
                            gpio.c: In function ‘doLoad’:
                            gpio.c:285:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                            system (cmd) ;
                            ^
                            gpio.c:291:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                            system (cmd) ;
                            ^
                            gpio.c: In function ‘doUnLoad’:
                            gpio.c:345:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                            system (cmd) ;
                            ^
                            gpio.c:351:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                            system (cmd) ;
                            ^
                            [Link]
                            [Install]

                            All Done.

                            NOTE: To compile programs with wiringPi, you need to add:
                            -lwiringPi
                            to your compile line(s) To use the Gertboard, MaxDetect, etc.
                            code (the devLib), you need to also add:
                            -lwiringPiDev
                            to your compile line(s).
                            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                            T Offline
                            T Offline
                            this
                            wrote on last edited by this
                            #26

                            @this I changed the version of qt and run it without errors.
                            The version I used was qt5.4.2.
                            I changed it to another version and it builds without errors.
                            Thank you for your help.

                            Is there a problem with qt5.4.2?
                            Hangul (Korean language) was also out of print, I had to worry about changing the version.
                            But wiringPi is also incompatible
                            Is there a problem with qt5.4.2 version?

                            jsulmJ 1 Reply Last reply
                            0
                            • T this

                              @this I changed the version of qt and run it without errors.
                              The version I used was qt5.4.2.
                              I changed it to another version and it builds without errors.
                              Thank you for your help.

                              Is there a problem with qt5.4.2?
                              Hangul (Korean language) was also out of print, I had to worry about changing the version.
                              But wiringPi is also incompatible
                              Is there a problem with qt5.4.2 version?

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

                              @this wiringPi isn't a Qt library to my knowledge, so it is not a Qt problem.
                              This is wrong:

                              LIBS += -L/usr/local/lib-lwiringPi
                              

                              it must be:

                              LIBS += -L/usr/local/lib -lwiringPi
                              

                              (space between lib and -l).
                              I really don't know what you are doing wrong. You should read http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
                              Also, "undefined reference" errors means that the a library (in your case wiringPi) is missing. Take a closer look at the compiler/linker output.
                              You can try to write a simple C++ console application without Qt but with wiringPi. Just create a makefile and build your app.

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

                              T 1 Reply Last reply
                              0
                              • jsulmJ jsulm

                                @this wiringPi isn't a Qt library to my knowledge, so it is not a Qt problem.
                                This is wrong:

                                LIBS += -L/usr/local/lib-lwiringPi
                                

                                it must be:

                                LIBS += -L/usr/local/lib -lwiringPi
                                

                                (space between lib and -l).
                                I really don't know what you are doing wrong. You should read http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
                                Also, "undefined reference" errors means that the a library (in your case wiringPi) is missing. Take a closer look at the compiler/linker output.
                                You can try to write a simple C++ console application without Qt but with wiringPi. Just create a makefile and build your app.

                                T Offline
                                T Offline
                                this
                                wrote on last edited by this
                                #28

                                @jsulm Qt Build with no error when running with version 5.5.1.
                                However, when building with qt 4.5.2, the above error also occurs.
                                Is not this a version issue?
                                Space above the space is filled in.
                                I misplaced that article.

                                jsulmJ 1 Reply Last reply
                                0
                                • T this

                                  @jsulm Qt Build with no error when running with version 5.5.1.
                                  However, when building with qt 4.5.2, the above error also occurs.
                                  Is not this a version issue?
                                  Space above the space is filled in.
                                  I misplaced that article.

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

                                  @this Again: wiringPi is not a Qt library. In fact it is not even C++, it is a C library. You don't build it with Qt (Qt is not a compiler) you build it with a C compiler (gcc).
                                  So what is the problem now: you can't build wiringPi or you can't build your Qt app which uses this lib?

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

                                  T 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @this Again: wiringPi is not a Qt library. In fact it is not even C++, it is a C library. You don't build it with Qt (Qt is not a compiler) you build it with a C compiler (gcc).
                                    So what is the problem now: you can't build wiringPi or you can't build your Qt app which uses this lib?

                                    T Offline
                                    T Offline
                                    this
                                    wrote on last edited by this
                                    #30

                                    @jsulm I am developing in qt.
                                    So I need to build wiringPi using qt.

                                    I think I can use wiringPi in qt.
                                    WiringPi is a c language library.
                                    So is it impossible to use in qt?
                                    If I can not use wiringPi in qt, I will code it in another way for GPIO control.

                                    If available in qt,
                                    Having said that,
                                    Ubuntu pc -> raspberrypi (rasbian)
                                    I am developing using cross compile.
                                    I am developing using qt 5.4.2.

                                    I tried to continue but failed to recognize the wiringPi function.

                                    So I tried qt 5.5.1.
                                    Qt 5.5.1 is not a cross compile.
                                    I run it on qt of ubuntu pc.

                                    The same source and the same project.
                                    Changed version and os of qt.
                                    (Note that changing os does not mean that raspberrypi has built the program.
                                    It refers to the os where the qt file is executed.)
                                    It recognizes wiringPi without error.

                                    So I think.
                                    Whether wiringPi is compatible with the Qt version,
                                    Whether wirignPi is not available depending on OS

                                    Do you understand my situation now?

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • T this

                                      @jsulm I am developing in qt.
                                      So I need to build wiringPi using qt.

                                      I think I can use wiringPi in qt.
                                      WiringPi is a c language library.
                                      So is it impossible to use in qt?
                                      If I can not use wiringPi in qt, I will code it in another way for GPIO control.

                                      If available in qt,
                                      Having said that,
                                      Ubuntu pc -> raspberrypi (rasbian)
                                      I am developing using cross compile.
                                      I am developing using qt 5.4.2.

                                      I tried to continue but failed to recognize the wiringPi function.

                                      So I tried qt 5.5.1.
                                      Qt 5.5.1 is not a cross compile.
                                      I run it on qt of ubuntu pc.

                                      The same source and the same project.
                                      Changed version and os of qt.
                                      (Note that changing os does not mean that raspberrypi has built the program.
                                      It refers to the os where the qt file is executed.)
                                      It recognizes wiringPi without error.

                                      So I think.
                                      Whether wiringPi is compatible with the Qt version,
                                      Whether wirignPi is not available depending on OS

                                      Do you understand my situation now?

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

                                      @this said in WiringPi build error:

                                      So I need to build wiringPi using qt.

                                      You don't build it using Qt, Qt is not a compiler. You need to understand the difference: Qt is just a C++ framework. You build the library using a compiler, not Qt.

                                      Yes, you can use C libraries in C++ projects. So, you can use it in your Qt project.

                                      "Whether wiringPi is compatible with the Qt version" - this does not make sense as wiringPi and Qt are two completely independent things, there is no compatibility. Your problem is not compatibility with Qt, your problem is with the wiringPi library which is apparently not compatible with the ABI you're using as the linker error clearly states. You most probably built wiringPi with a different compiler with different parameters. See one of my posts above: "The lib is EABI5: "ELF 32-bit LSB shared object, ARM, EABI5". I think RPi uses EABI7 or something. From where did you get the lib?" - this does not have anything to do with Qt.

                                      We already discuss this for long time now. I asked you whether you built wiringPi on your RaspberyPi and then copied the lib to your PC? Did you? You should build wiringPi with exact same compiler you're using for cross compilation (means: you need to cross compile wiringPi).
                                      So, my question is: how exactly did you build wiringPi for RaspberryPi?

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

                                      T 1 Reply Last reply
                                      0
                                      • jsulmJ jsulm

                                        @this said in WiringPi build error:

                                        So I need to build wiringPi using qt.

                                        You don't build it using Qt, Qt is not a compiler. You need to understand the difference: Qt is just a C++ framework. You build the library using a compiler, not Qt.

                                        Yes, you can use C libraries in C++ projects. So, you can use it in your Qt project.

                                        "Whether wiringPi is compatible with the Qt version" - this does not make sense as wiringPi and Qt are two completely independent things, there is no compatibility. Your problem is not compatibility with Qt, your problem is with the wiringPi library which is apparently not compatible with the ABI you're using as the linker error clearly states. You most probably built wiringPi with a different compiler with different parameters. See one of my posts above: "The lib is EABI5: "ELF 32-bit LSB shared object, ARM, EABI5". I think RPi uses EABI7 or something. From where did you get the lib?" - this does not have anything to do with Qt.

                                        We already discuss this for long time now. I asked you whether you built wiringPi on your RaspberyPi and then copied the lib to your PC? Did you? You should build wiringPi with exact same compiler you're using for cross compilation (means: you need to cross compile wiringPi).
                                        So, my question is: how exactly did you build wiringPi for RaspberryPi?

                                        T Offline
                                        T Offline
                                        this
                                        wrote on last edited by this
                                        #32

                                        @jsulm So, do you use wiringPI installed from raspberrypi?
                                        Do you want to copy the wiringPi installed by raspberrypi and enter the link to the ubuntu pc?

                                        I did not build wiringPi for cross compilation.
                                        I kept asking the way.

                                        What should I set up to use wiringPI in a cross-compilation environment?

                                        I do not speak English well.
                                        We still communicate using translator.
                                        Please describe in simple words.

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • T this

                                          @jsulm So, do you use wiringPI installed from raspberrypi?
                                          Do you want to copy the wiringPi installed by raspberrypi and enter the link to the ubuntu pc?

                                          I did not build wiringPi for cross compilation.
                                          I kept asking the way.

                                          What should I set up to use wiringPI in a cross-compilation environment?

                                          I do not speak English well.
                                          We still communicate using translator.
                                          Please describe in simple words.

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

                                          @this May be this can help: https://www.raspberrypi.org/forums/viewtopic.php?t=33881&p=289337

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

                                          T 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