Working on an object of mine, I copied code from snake_in~ and snake_out~ to enable multi-channel I/Os, but I get errors on s_length and s_nchans. More specifically, I get the following:
src/neuralnet~.c:4525:94: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_length’
4525 | dsp_add_copy(sp[i]->s_vec,
sp[x->x_nmultichans_in]->s_vec + i * sp[0]->s_length, sp[0]->s_length);
| ^~
src/neuralnet~.c:4525:111: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_length’
4525 | dsp_add_copy(sp[i]->s_vec,
sp[x->x_nmultichans_in]->s_vec + i * sp[0]->s_length, sp[0]->s_length);
| ^~
src/neuralnet~.c:4534:62: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_nchans’
4534 | int usenchans = (x->x_nmultichans_out <
sp[0]->s_nchans ? x->x_nmultichans_out : sp[0]->s_nchans);
| ^~
src/neuralnet~.c:4534:103: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_nchans’
4534 | int usenchans = (x->x_nmultichans_out <
sp[0]->s_nchans ? x->x_nmultichans_out : sp[0]->s_nchans);
| ^~
src/neuralnet~.c:4539:70: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_length’
4539 | dsp_add_copy(sp[0]->s_vec + i * sp[0]->s_length,
sp[i+1]->s_vec, sp[0]->s_length);
| ^~
src/neuralnet~.c:4539:103: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_length’
4539 | dsp_add_copy(sp[0]->s_vec + i * sp[0]->s_length,
sp[i+1]->s_vec, sp[0]->s_length);
| ^~
src/neuralnet~.c:4542:67: error: ‘t_signal’ {aka ‘struct _signal’} has
no member named ‘s_length’
4542 | dsp_add_zero(sp[i+1]->s_vec, sp[0]->s_length);
| ^~
src/neuralnet~.c: In function ‘neuralnet_tilde_setup’:
src/neuralnet~.c:4944:52: error: ‘CLASS_MULTICHANNEL’ undeclared (first
use in this function)
4944 | sizeof(t_neuralnet_tilde),
CLASS_MULTICHANNEL, A_GIMME, 0);
Is it likely that the Makefile is looking at an m_pd.h older than 0-54.0? I have installed 0-55.1 by compiling it. Is there something I need to do to point the compiler to the correct m_pd.h file?
On 9/12/24 17:32, Alexandros Drymonitis wrote:
Working on an object of mine, I copied code from snake_in~ and snake_out~ to enable multi-channel I/Os, but I get errors on s_length and s_nchans. More specifically, I get the following:
Is it likely that the Makefile is looking at an m_pd.h older than 0-54.0?
yes.
I have installed 0-55.1 by compiling it.
so, where does the header come from?
assuming you are running a Debian(derivative), you probably also have the "puredata-dev" package installed, which installs the headers to /usr/include/pd/ - and Makefile.pdlibbuilder uses this path as the default (if available).
to quote from the Makefile.pdlibbuilder:
# Default search path for m_pd.h and other API header files is platform
# dependent, and overridable by PDINCLUDEDIR:
#
# Linux: /usr/include/pd
Is there something I need to do to point the compiler to the correct m_pd.h file?
since the Makefile.pdlibbuilder is the canonical documentation of itself (it has plenty of comments explaining its workings), i guess this is just the answer.
make PDINCLUDEDIR=/usr/local/include/pd
(i guess pd-lib-bulider could prefer /usr/local/include/pd over /usr/include/pd, you could create an issue)
gfadsmnr IOhannes
since the Makefile.pdlibbuilder is the canonical documentation of itself (it has plenty of comments explaining its workings), i guess this is just the answer.
make PDINCLUDEDIR=/usr/local/include/pd
That did it (I guess you'll think "obviously" :) )
(i guess pd-lib-bulider could prefer /usr/local/include/pd over /usr/include/pd, you could create an issue)
I'll do that. Thanks for the help.