Csound Csound-dev Csound-tekno Search About

[Csnd] Opcode compile error

Date2014-05-12 13:33
Fromed
Subject[Csnd] Opcode compile error
I'm trying to compile the pvsarp opcode listed in  Extensions_to_Csound
   and the Audio
Programming Book. I'm trying to get this example working before developing
my own opcode that uses an fsig. The code I'm using is  pvsarp.c
  . When I try
compiling with the following command:

gcc -O2 -shared -o pvsarp.op pvsarp.c -DUSE_DOUBLE -I /usr/include/csound/
-w -Wall -Wextra --std=c99

I get the error message:

pvsarp.c:66:5: error: initializer element is not computable at load time
     {"pvsarp", sizeof(pvsarp), 3, "f", "fkkk", (SUBR)pvsarp_init,
     ^
pvsarp.c:66:5: error: (near initialization for ‘localops[0].thread’)


I was previously getting an error about number of arguments to PerfError but
adding p->h.insdshead has stopped that appearing. This other error message
has me stumped though. I'm using csound 6.03.

Ed



--
View this message in context: http://csound.1045644.n5.nabble.com/Opcode-compile-error-tp5735142.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2014-05-12 13:54
FromVictor Lazzarini
SubjectRe: [Csnd] Opcode compile error
yes, that’s changed in csound 6. Look at this new article:

http://en.flossmanuals.net/csound/extending-csound/
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 12 May 2014, at 13:33, ed  wrote:

> I'm trying to compile the pvsarp opcode listed in  Extensions_to_Csound
>    and the Audio
> Programming Book. I'm trying to get this example working before developing
> my own opcode that uses an fsig. The code I'm using is  pvsarp.c
>   . When I try
> compiling with the following command:
> 
> gcc -O2 -shared -o pvsarp.op pvsarp.c -DUSE_DOUBLE -I /usr/include/csound/
> -w -Wall -Wextra --std=c99
> 
> I get the error message:
> 
> pvsarp.c:66:5: error: initializer element is not computable at load time
>     {"pvsarp", sizeof(pvsarp), 3, "f", "fkkk", (SUBR)pvsarp_init,
>     ^
> pvsarp.c:66:5: error: (near initialization for ‘localops[0].thread’)
> 
> 
> I was previously getting an error about number of arguments to PerfError but
> adding p->h.insdshead has stopped that appearing. This other error message
> has me stumped though. I'm using csound 6.03.
> 
> Ed
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Opcode-compile-error-tp5735142.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
> 



Date2014-05-12 23:20
Fromed
Subject[Csnd] Re: Opcode compile error
Thanks for that. I've now got it working. I was missing the 3rd OENTRY
variable in case anyone is interested. 

I needed to add the command line flag -fPIC to get the compile to work in
one go on linux.

I also compiled the newopc example in the flossmanual but I needed to to
replace '' with '\0' to get it to work. I was getting an 'empty character
constant' error message.

Is the flossmanual a wiki for anyone to edit? I'd be happy to add these last
two items unless there's a reason why my experience isn't generally
applicable.



--
View this message in context: http://csound.1045644.n5.nabble.com/Opcode-compile-error-tp5735142p5735183.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-12 23:23
FromRory Walsh
SubjectRe: [Csnd] Re: Opcode compile error
You can be added to the list of users with write access. I think you
can ask Joachim for access.

On 13 May 2014 00:20, ed  wrote:
> Thanks for that. I've now got it working. I was missing the 3rd OENTRY
> variable in case anyone is interested.
>
> I needed to add the command line flag -fPIC to get the compile to work in
> one go on linux.
>
> I also compiled the newopc example in the flossmanual but I needed to to
> replace '' with '\0' to get it to work. I was getting an 'empty character
> constant' error message.
>
> Is the flossmanual a wiki for anyone to edit? I'd be happy to add these last
> two items unless there's a reason why my experience isn't generally
> applicable.
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Opcode-compile-error-tp5735142p5735183.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>

Date2014-05-12 23:34
FromVictor Lazzarini
SubjectRe: [Csnd] Re: Opcode compile error
yes, I just noticed the formatting error in the memset lines (it should be a 0, not ' ').
On 12 May 2014, at 23:20, ed wrote:

> Thanks for that. I've now got it working. I was missing the 3rd OENTRY
> variable in case anyone is interested. 
> 
> I needed to add the command line flag -fPIC to get the compile to work in
> one go on linux.
> 
> I also compiled the newopc example in the flossmanual but I needed to to
> replace '' with '\0' to get it to work. I was getting an 'empty character
> constant' error message.
> 
> Is the flossmanual a wiki for anyone to edit? I'd be happy to add these last
> two items unless there's a reason why my experience isn't generally
> applicable.
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Opcode-compile-error-tp5735142p5735183.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2014-05-13 13:01
Fromjoachim heintz
SubjectRe: [Csnd] Re: Opcode compile error
he already has =)

i also noticed the '\0' error. i think this is due to a format issue 
because of the backslash.

in my opinion, victor's instruction should go anywhere in a developer 
section at csound's github page. flossmanuals are not good for it 
because of the separation between "read" and "write" section. it is no 
wiki at all.

	joachim


Am 13.05.2014 00:23, schrieb Rory Walsh:
> You can be added to the list of users with write access. I think you
> can ask Joachim for access.
>
> On 13 May 2014 00:20, ed  wrote:
>> Thanks for that. I've now got it working. I was missing the 3rd OENTRY
>> variable in case anyone is interested.
>>
>> I needed to add the command line flag -fPIC to get the compile to work in
>> one go on linux.
>>
>> I also compiled the newopc example in the flossmanual but I needed to to
>> replace '' with '\0' to get it to work. I was getting an 'empty character
>> constant' error message.
>>
>> Is the flossmanual a wiki for anyone to edit? I'd be happy to add these last
>> two items unless there's a reason why my experience isn't generally
>> applicable.
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/Opcode-compile-error-tp5735142p5735183.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> Send bugs reports to
>>          https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>>
>
>
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
>