<div dir="ltr">Thanks a lot ! I think I get it. I'll do it asap.<br><div class="gmail_extra"><br><div class="gmail_quote">2016-09-22 17:06 GMT+02:00 IOhannes m zmoelnig <span dir="ltr"><<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2016-09-22 12:21, Antoine Rousseau wrote:<br>
> 2016-09-22 11:03 GMT+02:00 IOhannes m zmoelnig <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>>:<br>
><br>
>> On 2016-09-22 08:37, Antoine Rousseau wrote:<br>
>>> you need<br>
>>> to be aware of the version at compilation time, and have to use this<br>
>>> version at runtime. So I don't think you can build an external that would<br>
>>> be compatible for both versions.<br>
>><br>
>> why?<br>
>><br>
><br>
> Because interfaces changed :<br>
><br>
> -void iemgui_save(t_iemgui *iemgui, t_symbol **srl, int *bflcol)<br>
> +void iemgui_save(t_iemgui *iemgui, t_symbol **srl, t_symbol**bflcol)<br>
</span>[...]<br>
<span class="">><br>
> so how could I build a binary that would switch the interface of iemgui_save<br>
> at runtime, following the version of the running Pd ?<br>
><br>
><br>
<br>
<br>
</span>in pseudo code:<br>
if(pd<0.47)<br>
  iemgui_save(x, srl, i_color);<br>
else<br>
  iemgui_save(x, srl, s_color);<br>
<br>
this will give you some compiler warnings, but you can do:<br>
<br>
typedef void(t_iemgui_save_old*)(t_<wbr>iemgui *iemgui, t_symbol **srl, int<br>
*bflcol);<br>
typedef void(t_iemgui_save_new*)(t_<wbr>iemgui *iemgui, t_symbol **srl,<br>
t_symbol **bflcol);<br>
<br>
if(pd<0.47) {<br>
    t_iemgui_save_old isave=(t_iemgui_save_old)<wbr>iemgui_save;<br>
    isave(x, srl, i_color);<br>
} else {<br>
    t_iemgui_save_old isave=(t_iemgui_save_new)<wbr>iemgui_save;<br>
    isave(x, srl, s_color);<br>
}<br>
<br>
fgmsdr<br>
<span class="HOEnZb"><font color="#888888">IOhannes<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><font face="arial, helvetica, sans-serif"> Antoine Rousseau </font></div><div dir="ltr"><font face="arial, helvetica, sans-serif">  <a href="http://metalu.net" target="_blank">http://www.metalu.net</a> __ <a href="http://www.metaluachahuter.com/compagnies/al1-ant1/" target="_blank">http://www.metaluachahuter.com/</a><br><br></font></div></div></div></div></div>
</div></div>