WiringPi Build Issue

Sysprogs forums Forums VisualGDB WiringPi Build Issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28222
    xeeaxe
    Participant

    Hi, Visual Studio recognizes #include <wiringPi.h> and allows me to point to the header file but when I build, I get this error:
    Severity Description Project File Line
    Error undefined reference to `wiringPiSetupGpio' TEST C:\Users\xeeaxe\source\repos\TEST\TEST.cpp 12

    I did Synchronize Sysroot; in fact I can see the Wiring Pi headers and libraries under C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr

    I use the same image recommended by VisualGDM MSBuild Toolchain. I also upgraded WiringPi for my Raspberry Pi 4 using these instructions and re-did Synchronize Sysroot, Re-download all files, Remove previous contents before synchronizing.

     

    Not sure if I should set the -lwiringPi flag, something suggested here. Can you please help me figure out what might be causing this? Thank you!

    #28251
    support
    Keymaster

    Please follow this tutorial to diagnose the “undefined reference” errors: https://visualgdb.com/tutorials/linux/libraries/diagnosing/

    #28281
    xeeaxe
    Participant

    Thank you, a little late because I had already solved it but it’s a nice tutorial! For those who might have the same issue, adding “wiringPi” to the Library Name field under VisualGDB Project Properties solves the issue.

    #28282
    support
    Keymaster

    Good to know it works. We are usually able to answer most inquiries within 24-48 hours (depending on the backlog).

    Either way, if you encounter strange errors, we always advise searching our tutorials and documentation first. They contain detailed explanations for many common issues and can get you up and running faster than waiting for a support ticket to get through the queue.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.