I have a strange wirePi 'undefined Reference' problem with Anjuta IDE on Raspberry Pi 3 B+ with Ubuntu MATE (Ubuntu 18.04.2 LTS - arm 64bit, MATE 1.20.1) while gpio and gcc from terminal work well...
When I start a simple (or any other) c (or c++) project with Anjuta and I try to run or build the blink example program
int main (void)
wiringPiSetup () ;
pinMode (0, OUTPUT) ;
for (int n=0; n <100; n=n+1)
digitalWrite (0, HIGH) ; delay (200) ;
digitalWrite (0, LOW) ; delay (200) ;
return 0 ;
it fails with 'undefinied Reference' erros at each wiringPi commands.
(While the Anjuta's default "Hello World!" work well.)
Of course I tried to set a lot of combination the gcc options what mentioned in this forum thread and other places under the Anjuta's Project/Properties windows textboxes:
- -L/usr/lib (and) -L/usr/lib/aarch64-linux-gnu (This is where the system find the libwiringPi.so link)
I edited the /etc/ld.so.conf.d
and added the
and run sudo ldconf
but it doesn't work at all...
If I use gcc directly from terminal everything is fine:
$ gcc ...path/main.c -lwiringPi -o blinkled
gcc do it's work and compile well. The program do what it need to do... (blink the led which connected to GPIO)
(As I mentioned above the gpio work well too.)
So I can't find the solution what very annoying to me because I use Anjuta on my desktop PC and I like it...
Like enough it's not the wiringPi's fault but Anjuta's but I didn't find better thread
Please help me if someone can!