TGB1718 Posted February 16 Share Posted February 16 Hoping for some info on an issue I had on a Raspberry Pi 5, the reason I post here is that I use a Pi to burn EPROMs for my 8 bits and wrote a program on a Pi 3B. The Pi 5 uses a completely different library to access the GPIO pins, so having to rewrite quite a bits of code to get the programmer to work on the new Pi. My question is (as there's tons of knowledge here) when I compile I have to include the new gpiod library. so if I use for example cc test.c -llibgpiod.a -o test the compile fails as it can't find the library, however if I use:- cc test.c -l:libgpiod.a -o test (Note the ':') and this works. I can't find any reference to using a : but it does appear doing it makes the linker look into /usr/lib/aarch64-linux-gnu/ instead of /usr/lib/ Any guru's here that can explain Thanks in advance. Quote Link to comment Share on other sites More sharing options...
sanny Posted February 16 Share Posted February 16 You need to exclude the leading "lib". So to link with libfoo.a use -lfoo 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted February 16 Author Share Posted February 16 58 minutes ago, sanny said: You need to exclude the leading "lib". So to link with libfoo.a use -lfoo Had to remove the .a also, but that works fine, many thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.