[PD-dev] pd-lib-builder question (on osx)

Christof Ressi info at christofressi.com
Wed Oct 28 00:02:24 CET 2020


Hi,

here's the explanation: 
https://github.com/pure-data/pd-lib-builder/blob/e6cff665a3a30a967c72c382c6fe92bcdedd7b44/Makefile.pdlibbuilder#L45

"class.sources" assumes one source per class. What you need is 
"<classname>.class.sources", i.e. "s4pd.class.sources = s4pd.c s7.c"

"common.sources" would have worked too, you just made a typo ;-) 
However, I think the solution above is clearer, as "common.sources" is 
really meant for the case where you have *multiple* classes with same 
shared code.

Christof

On 27.10.2020 23:44, Iain Duncan wrote:
> Hi devs, I'm trying to get pd-lib-builder working, but I think my lack 
> of C building experience has me stuck. I was able to get my empty 
> helloworld working ok, but not managing to link in S7.
>
> My project has one C file, and needs to also include s7.h and build 
> s7.c  I've included my (not working) Makefile below. When I try the 
> below s7 does get compiled, producing an s7.o file, but instead of 
> static linking I get an s7.pd_darwin file with all of the S7 stuff 
> (it's big) and a tiny s4pd.pd_darwin file. And the external tries to 
> load an s7 function and fails. Any tips much appreciated!
>
> thanks,
> Iain
>
> My Makefile:
>
> # library name
> lib.name <http://lib.name> = s4pd
>
> # tried these too, to no avail
> #lib.setup.sources = s7.c
> #common.source = s7.c
>
> # input source file (class name == source file basename)
> class.sources = s4pd.c s7.c
>
> # all extra files to be included in binary distribution of the library
> datafiles = README.md
>
> # include Makefile.pdlibbuilder from submodule directory 'pd-lib-builder'
> PDLIBBUILDER_DIR=pd-lib-builder/
> include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20201028/a860fff8/attachment.html>


More information about the Pd-dev mailing list