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 18.0k 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 I entered 'file /usr/local/lib/libwiringPi.so.2.44' in the terminal.
    I got the following results.

    /usr/local/lib/libwiringPi.so.2.44: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID [sha1] = 13145f24d2081640dbda7cfb4d9648ceea0a77d6, not stripped

    I modified the LIBS as you said.
    But there are still errors.

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

    @this Which errors?

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

    T 1 Reply Last reply
    0
    • jsulmJ jsulm

      @this Which errors?

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

      @jsulm It is the same error as the first inquiry.
      "file not recognized:file format not recognized
      /usr/local/lib/libwiringPi.so
      collect2:error:ld returned 1 exit status"

      jsulmJ 1 Reply Last reply
      0
      • T this

        @jsulm It is the same error as the first inquiry.
        "file not recognized:file format not recognized
        /usr/local/lib/libwiringPi.so
        collect2:error:ld returned 1 exit status"

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

        @this Did you rerun qmake after fixing LIBS in pro file?

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

        T 1 Reply Last reply
        0
        • jsulmJ jsulm

          @this Did you rerun qmake after fixing LIBS in pro file?

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

          @jsulm Yes, of course.
          I also run rebuild.
          However, the same error occurs.

          jsulmJ 1 Reply Last reply
          0
          • T this

            @jsulm Yes, of course.
            I also run rebuild.
            However, the same error occurs.

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

            @this Can you show your pro file and the build log? Are you actually building for ARM?

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

            T 1 Reply Last reply
            0
            • jsulmJ jsulm

              @this Can you show your pro file and the build log? Are you actually building for ARM?

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

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

              Do you need more information?

              jsulmJ 1 Reply Last reply
              0
              • 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

                                          • Login

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