Author Topic: Using Raspberry Pi libraries with Code::Blocks  (Read 1676 times)

Offline tomine

  • Single posting newcomer
  • *
  • Posts: 2
Using Raspberry Pi libraries with Code::Blocks
« on: November 03, 2022, 03:58:58 pm »
Hi! Asking here as I feel like I have read every existing forum online, and still cannot figure out how to solve my problem:
I need to use a Raspberry Pi with Code::Blocks, and in order to do this I need to connect a library to Code::Blocks.
I want to use "pigpio", but no matter how I try, it doesn't seem to work. Has anyone experienced this before? On the Code::Blocks Wiki it says to
"Add the required paths for compiler and linker.", which is what I cannot seem to do. No site explains this in detail either.
Could anyone help me with this, aka give me a concrete tutorial? I would be forever grateful.

I'm new to this forum but hopefully the mods will let this one stay up, as this really is my last resort.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1254
Re: Using Raspberry Pi libraries with Code::Blocks
« Reply #1 on: November 03, 2022, 04:28:48 pm »
Read this for file names and location.

You must add /usr/local/lib to Search directories -> Linker and libpigpio.so to Linker settings -> Link libraries.

EDIT: add /usr/local/include to Search directories -> Compiler.
« Last Edit: November 03, 2022, 04:31:00 pm by Miguel Gimenez »

Offline tomine

  • Single posting newcomer
  • *
  • Posts: 2
Re: Using Raspberry Pi libraries with Code::Blocks
« Reply #2 on: November 03, 2022, 05:56:51 pm »
thankyou so much! :))