Important: Please read the Qt Code of Conduct -

wiringPi does not work in Qt.

  • 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.


  • Qt Champions 2020

    @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.

  • @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.


  • 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.

Log in to reply