Gpio from c program

Good morning,

someone could kindly address me how to write a C program to control GPIO ?
On Raspy i used wiringPi, on rock 4 se i could not build winringx.
i’ve installed gpiod (rockpi-4b-debian-bullseye-xfce4-arm64-20221109) but gpiodetect returns nothing.
Libmraa seems give me a chanche because it works from shell.

Any suggestions ?
Thank you
regards
Mirko

Check wiringX:

https://www.wiringx.org/platforms/radxa/rock4.html
https://wiki.radxa.com/WiringX

I have a RockPI 4 and want do control the GPIOs with a C/C++ programm.
I installed Debian Buster and finally wiringX.
Compiling my first program works (gcc blink.c -lwiringX) without error or warning.
But when running the program wiringXSetup() returns -1. And I have no idea why.

What can be the problem? What can I do to identify and fix the problem?

Martin