[PD] M1 Externals

Christof Ressi info at christofressi.com
Mon Mar 21 01:56:45 CET 2022


> changed "error" to "pd_error" and compiles and loads
Be careful, pd_error() has an additional "void *" argument! This means 
the following is not correct:
> pd_error("[comport]: %ld not valid, using closest value: %ld", *baud, 
> baudratetable[i]);
> pd_error("*Warning* The baud rate %ld is not supported or out of 
> range, using 9600\n",*baud);

If there is an object, pass it as the first argument. Otherwise pass NULL.

Generally, you should always pass an object whenever possible because it 
helps users to find the source of the error.

Christof

On 21.03.2022 01:44, Philip Stone via Pd-list wrote:
>
> I finally took the plunge (don’t know why I’ve never done this before) 
> and figured out how to compile an external, trying ‘comport’ for arm64 
> to start with, and got the same result as me.grimm. XCode version is 
> 13.3 if that matters, but I called make directly from the shell.
>
> Sorry for my ignorance on the compiling aspect, but I do wish to 
> learn, now that I have some time.
>
> Phil
>
>   * *comport.c:693:9: **error: **implicit declaration of function
>     'error' is
>     invalid in C99 [-Werror,-Wimplicit-function-declaration]*
>
>             error("[comport]: %ld not valid, using closest value:
>     %ld", *baud,
>     baudratetable[i]);
>
>     *        ^*
>
>     changed "error" to "pd_error" and compiles and loads. lots of warnings
>     though.
>
>     forked here: https://github.com/megrimm/pd-comport
>     <https://github.com/megrimm/pd-comport>
>
>     m
>
>
> _______________________________________________
> Pd-list at lists.iem.at  mailing list
> UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20220321/01555be1/attachment.htm>


More information about the Pd-list mailing list