Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. wiringPi does not work in Qt.
Forum Updated to NodeBB v4.3 + New Features

wiringPi does not work in Qt.

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 635 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.
  • Hasan VaezH Offline
    Hasan VaezH Offline
    Hasan Vaez
    wrote on last edited by
    #1

    Re: stdlib.h not found

    Hello guys. I have the same Error.
    It looks like there is a problem with the guy who is developing wiringPi. I his website he metioned I do not support wiringPi more.

    I have search github for equivalent Libs, but it seems anyone does not recommend it.
    I have installed my wiringPi via "sudo apt-get install wiringpi".

    Outside of Qt I can handle GPIO and it works fine, but in Qt seems there is a problem. I think Qt compiler is using a newer version of GCC than my wiringPi Libs.

    I would be very thankful if some one can help me.

    Regards,...

    K 1 Reply Last reply
    0
    • Hasan VaezH Hasan Vaez

      Re: stdlib.h not found

      Hello guys. I have the same Error.
      It looks like there is a problem with the guy who is developing wiringPi. I his website he metioned I do not support wiringPi more.

      I have search github for equivalent Libs, but it seems anyone does not recommend it.
      I have installed my wiringPi via "sudo apt-get install wiringpi".

      Outside of Qt I can handle GPIO and it works fine, but in Qt seems there is a problem. I think Qt compiler is using a newer version of GCC than my wiringPi Libs.

      I would be very thankful if some one can help me.

      Regards,...

      K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      @Hasan-Vaez ,

      why do you need in this library at all? Just use the "direct" GPIO management trough the sysfs. What are problems? You can search about in a google.

      Hasan VaezH 1 Reply Last reply
      1
      • K kuzulis

        @Hasan-Vaez ,

        why do you need in this library at all? Just use the "direct" GPIO management trough the sysfs. What are problems? You can search about in a google.

        Hasan VaezH Offline
        Hasan VaezH Offline
        Hasan Vaez
        wrote on last edited by
        #3

        @kuzulis
        Hi kuzulis,
        I found a absolute answer for solving this problem for all who have this problem.
        The problem is RF24 Headers. RF24 uses wiringPi for handling nrf (nrf24l01+) and it has a conflict with wiringPi Libs.
        The solution is to forget separate wiringPi Libs ad use RF24 wiringPI . There GPIO pin in RF24 are changed into Rpi pin number. For example in standard wiringPi if we use port 23 the GPIO number is 4, but in RF24 Libs the GPIO is 23.
        We also do not need to initialize wiringPi (wirigPiSetup() is not needed here as it has run when start to use RF24) .

        I would be pleased if you also tell me your solution. How to use direct GPIO from sysfs?

        After you answer I will tick this Topic as SOLVED. I also used some Key Words in this topic for all who have this problem in future.

        Reagards,

        1 Reply Last reply
        0
        • Hasan VaezH Offline
          Hasan VaezH Offline
          Hasan Vaez
          wrote on last edited by
          #4

          GPIO headers if RF24 are not enough to work with wiringpi. some features like pwmWrite and also analogwrite are not available.
          The solution is to compile rf24 Libs using wiringPi mode not any other modes. Then we can use external Libs of wiringPi without any conflict.

          So I mark this post as Solved.

          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