<div dir="ltr"><div>Apologies,</div><div>The previous post contained an earlier version of the patch, in which 3 functions were not marked for export. Please, use the attached one, which is the latest version.</div><div><br></div><div>Vlad F<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 18, 2022 at 11:01 PM vladimir florentino &lt;<a href="mailto:optimusvlad@gmail.com">optimusvlad@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">

<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,&quot;Courier New&quot;,monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(212,212,212)">Hello,</span></div><br><div><span style="color:rgb(212,212,212)">Please find attached a patch to enable using S7 across DLLs on Microsoft Windows.</span></div><br><div><span style="color:rgb(212,212,212)">In Windows, if there are functions in a Library or EXE that are intended to be used in a different Library or EXE, then those functions must be &quot;exported&quot;. </span></div><div><span style="color:rgb(212,212,212)">To export, functions are marked with the &quot;__declspec(dllexport)&quot; annotation, in the implementation library. </span></div><div><span style="color:rgb(212,212,212)">That will cause the symbols to be included in the generated &quot;.lib&quot; file. </span></div><div><span style="color:rgb(212,212,212)">This will enable the importing library to find the symbols during the linking step.</span></div><br><div><span style="color:rgb(212,212,212)">The patch adds an export macro to all the S7 api functions. By default, the export annotation has no effect; the export behavior is opt-in.</span></div><div><span style="color:rgb(212,212,212)">The opt-in is done by defining the symbol &#39;S7_EXPORT_LIB&#39; in the implementation library.</span></div><br><div><span style="color:rgb(212,212,212)">I wrote this patch myself, and I hereby release it into the public domain.</span></div><br><div><span style="color:rgb(212,212,212)">Thanks,</span></div><div><span style="color:rgb(212,212,212)">Vlad F</span></div></div>

</div>
</blockquote></div>