Re: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] Building example CPOF plugin opcodes

Victor Lazzarini <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <[email protected]>
Ah, that's it. I saw that in your other email and wondered. It doesn't have the C++ libs by
default.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 24 Jun 2024, at 10:31, Pierre Clisson <[email protected]> wrote:
> 
> Got it working. I was uing gcc instead of g++...
> Thanks again!
> 
> Victor Lazzarini wrote on 24/06/2024 00:59:
>> I have an M1 and the code compiles and runs.
>> 
>>  In fact, you probably would have trouble building Csound because the same code is used in several opcodes in the system.
>> 
>> I am wondering what the problem might be, check that the command line is right.
>> 
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>>>> On 23 Jun 2024, at 20:05, Pierre Clisson <[email protected]> wrote:
>>> 
>>> I'm using an Apple M2 chip, if that can help.
>>> I have the same issue on both branches master and develop.
>>> The code compiles when I comment `return csound->init_error("...");`
>>> 
>>> vlz wrote on 23/06/2024 21:59:
>>>> Actually, I am looking at this now and I can’t see there is any problem with these functions, no
>>>> build errors. LocalizeString() is ok, so I don’t know why you are getting linking errors.
>>>> 
>>>>>> On 23 Jun 2024, at 12:16, Pierre Clisson <[email protected]> wrote:
>>>>> Thanks.
>>>>> 
>>>>> I also see that sr() and kr() must now be called directly.
>>>>> 
>>>>> What is the recommended way to log messages? I have the following error while using csound->init_error()/perf_error()/warning()/message():
>>>>> 
>>>>> symbol(s) not found for architecture arm64
>>>>> 
>>>>> 
>>>>> vlz wrote on 23/06/2024 16:05:
>>>>>> yes, that example is for Csound 6. In Csound 7, that function disappears and instead if you want to use a deinit(), then it’s
>>>>>> just a matter of implementing it (like init() in the class). I have yet to adjust these examples.
>>>>>> 
>>>>>>> On 23 Jun 2024, at 11:25, Pierre Clisson <[email protected]> wrote:
>>>>>>> 
>>>>>>> Hi!
>>>>>>> 
>>>>>>> I'm trying to build the example CPOF plugin opcodes (develop branch) on MacOS using:
>>>>>>> 
>>>>>>> gcc -O2 -dynamiclib -o opcodes.dylib opcodes.cpp -I/Users/mesca/Library/Frameworks/CsoundLib64.framework/Headers -std=c++11 -DUSE_DOUBLE
>>>>>>> 
>>>>>>> Unfortunately, I have a bunch of unresolved symbols, including:
>>>>>>> 
>>>>>>> opcodes.cpp:73:13: error: no member named 'plugin_deinit' in 'csnd::Csound'
>>>>>>>     csound->plugin_deinit(this);
>>>>>>>     ~~~~~~  ^
>>>>>>> opcodes.cpp:138:36: error: no member named 'sr' in 'csnd::Csound'
>>>>>>>     delay.allocate(csound, csound->sr() * inargs[1]);
>>>>>>> 
>>>>>>> Also, using csound->init_error()/message()/... result in:
>>>>>>> 
>>>>>>> ld: symbol(s) not found for architecture arm64
>>>>>>> 
>>>>>>> What am I missing?
>>>>>>> 
>>>>>>> 
>>> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.