Hey thanks for that, I was aware I was cargo-culting there haha, so the explanation is much appreciated. :-)
iain
On Wed, Oct 28, 2020 at 9:29 AM IOhannes m zmoelnig zmoelnig@iem.at wrote:
On 10/28/20 12:09 AM, Iain Duncan wrote:
cflags = -I . -L . -l s7
if this works, then it's only because you somehow managed to have a libs7.so (or libs7.a) file lying around, against which it linked.
afaict, this is not a safe assumption
gdfmasdr IOhannes
and some more nitpicking:
i think it's better style to omit the spaces after the -I/-L/-l flags: cflags = -I. -L. -ls7
also the "-I." is only useful if you happen to use includes with angled-brackets (e.g. '#include <s7.h>') as opposed to includes with quotes (e.g. '#include "s7.h"'). if you want to include the local header file anyhow (rather than some system-installed header of the same name) you should use includes-with-quotes rather than add '-I' to the cflags.
and "-L" and "-l" are really linker flags. you should *not* add them to cflags. instead of "ldlibs" resp. "ldflags".
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev