<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>
      <blockquote type="cite"><span style="font-size:11.0pt;color:black"><span
            style="background:white">changed "error" to "pd_error" and
            compiles and loads</span></span></blockquote>
      Be careful, pd_error() has an additional "void *" argument! This
      means the following is not correct:<br>
      <blockquote type="cite"><span class="pl-c1">pd_error</span>(<span
          class="pl-s"><span class="pl-pds">"</span>[comport]: <span
            class="pl-c1">%ld</span> not valid, using closest value: <span
            class="pl-c1">%ld</span><span class="pl-pds">"</span></span>,
        *baud, baudratetable[i]);</blockquote>
      <blockquote type="cite"><span class="pl-c1">pd_error</span>(<span
          class="pl-s"><span class="pl-pds">"</span>*Warning* The baud
          rate <span class="pl-c1">%ld</span> is not supported or out
          of range, using 9600<span class="pl-cce">\n</span><span
            class="pl-pds">"</span></span>,*baud);</blockquote>
    </p>
    <p><span class="pl-en">If there is an object, pass it as the first
        argument. Otherwise pass NULL.<br>
      </span><span class="pl-en"><span class="pl-en"></span></span></p>
    <p><span class="pl-en">Generally, you should always pass an object
        whenever possible because it helps users to find the source of
        the error.</span><span class="pl-en"></span><span class="pl-en"></span><span
        class="pl-en"><span class="pl-en"></span></span></p>
    <p>Christof</p>
    <div class="moz-cite-prefix">On 21.03.2022 01:44, Philip Stone via
      Pd-list wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BY5PR08MB6423896D3959CA89C631C674A7169@BY5PR08MB6423.namprd08.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0in;}ul
        {margin-bottom:0in;}</style>
      <div class="WordSection1">
        <div>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white">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.<o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white">Sorry
              for my ignorance on the compiling aspect, but I do wish to
              learn, now that I have some time.<o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white">Phil<o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white"><o:p> </o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:11.0pt;color:black;background:white"><o:p> </o:p></span></p>
          <ul style="margin-top:0in" type="disc">
            <li class="MsoListParagraph"
              style="margin-left:0in;mso-list:l0 level1 lfo1"><span
                style="font-size:11.0pt;color:black;background:white">*comport.c:693:9:
                **error: **implicit declaration of function 'error' is</span><span
                style="font-size:11.0pt;color:black"><br>
                <span style="background:white">invalid in C99
                  [-Werror,-Wimplicit-function-declaration]*</span><br>
                <br>
                <span style="background:white">        error("[comport]:
                  %ld not valid, using closest value: %ld", *baud,</span><br>
                <span style="background:white">baudratetable[i]);</span><br>
                <br>
                <span style="background:white">*        ^*</span><br>
                <br>
                <span style="background:white">changed "error" to
                  "pd_error" and compiles and loads. lots of warnings</span><br>
                <span style="background:white">though.</span><br>
                <br>
                <span style="background:white">forked here:  </span></span><span
                style="font-size:11.0pt"><a
                  href="https://github.com/megrimm/pd-comport"
                  title="https://github.com/megrimm/pd-comport"
                  moz-do-not-send="true"><span style="color:#000064">https://github.com/megrimm/pd-comport</span></a><span
                  style="color:black"><br>
                  <br>
                  <span style="background:white">m</span></span><o:p></o:p></span></li>
          </ul>
          <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
  </body>
</html>