Linking failing for me on FreeBSD 13
I've used this library very successfully for many years under Linux.
Now, I am trying to move my program to FreeBSD, and when I attempt to compile cl-gd-glue.so, I receive the following error messages:
`make cc -I/usr/local/include -fPIC -c cl-gd-glue.c ld -shared -lgd -lz -lpng -ljpeg -lfreetype -lm -lc cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib ld: error: unable to find library -lz ld: error: unable to find library -lm ld: error: unable to find library -lc *** Error code 1
Stop. make: stopped in /usr/home/wgl/quicklisp/dists/quicklisp/software/cl-gd-20201220-git `
It sounds like there are some support libraries missing?
Try changing the invocation of ld in the Makefile:5 to cc. I could run make successfully with that change on FreeBSD-12, where it failed with the same error originally.
Magic!
Thanks much
I had to rebuild my system and came across this again. This time, to make it work i used the ld command
ld -shared -lgd -ljpeg -lfreetype cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib
Leaving off some of the -lz (etc) commands and all is working again.
The only suggestion I have is to update the documentation for FreeBSD users.