<div dir="ltr"><div>Hi Christof,</div><div><br></div><div>I'm not a specialist of Windows so I can miss something important. </div><div>How do you specify the target machine? Are you sure you compiled against the 64bit version of pd.lib? </div><div>Because I didn't check the symbols of the 32 bit distribution, perhaps they are available. </div><div><br></div><div>Another question: I assumed that **_WIN32** must be defined (isn't it?) and so **PD_INTERNAL** must also be used if we want to export properly the function `setup_class()` using **EXTERN**. </div><div>I see that you don't define any of these constants, are they useless in your case? And why? </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-23 13:40 GMT+02:00 Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">this is odd. I made a simple Pd external which uses s_list and s_signal with MSVC in two versions: <br>
one links against Miller's pd.lib, the other links against the pd.lib I get when building from source with MinGW and autotools.<br>
Both versions compile, link and load just fine with either Pd version.<br>
<br>
I'm using the Developer command prompt, these are my commands:<br>
<br>
> cl /W3 /DNT /DPD /nologo /I. /IPDSOURCEPATH /c testobj.c<br>
> link /dll /export:testobj_setup testobj.obj oldnames.lib kernel32.lib PDBINPATH\pd.lib<br>
<br>
Christof<br>
 <br>
<br>
Gesendet: Mittwoch, 23. Mai 2018 um 12:01 Uhr<br>
Von: "Pierre Guillot" <<a href="mailto:guillotpierre6@gmail.com">guillotpierre6@gmail.com</a>><br>
An: "IOhannes m zmoelnig" <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>><br>
Cc: pd-dev <<a href="mailto:pd-dev@lists.iem.at">pd-dev@lists.iem.at</a>><br>
Betreff: Re: [PD-dev] pd.lib & msvc - missing symbols<br>
<span class=""><br>
> however, it would be nice if the shipped pd.lib (which uses the MinGW<br>
> toolchain and doesn't have the MSVC tools) would contain all the<br>
> required symbols.<br>
 <br>
Yes, what seems strange is that s_list and s_signal were defined in the shipped pd.def but not in pd.lib...<br>
 <br>
> otoh, i do think that those global variables (`e.g. `s_float`) shouldn't<br>
> be used in the first place: use the `gensym()` equivalents.<br>
 <br>
<br>
Why? <br>
I used these variable because I assumed that they are more efficient than using `gensym()` (and as they are defined EXTERN I also assumed that they can be used). <br>
But yes perhaps a better solution would be to generate and store the symbols in the new method of the object using `gensym()` (and it will be the same but for the sustainability of old codes, these symbols must be included).<br>
 <br>
Thanks<br>
 <br>
</span><span class="">2018-05-23 11:38 GMT+02:00 IOhannes m zmoelnig <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>[mailto:<a href="mailto:zmoelnig@iem.at">zmoeln<wbr>ig@iem.at</a>]>:On 2018-05-23 11:29, Pierre Guillot wrote:<br>
> But there are missing symbols: on Windows<br>
> 64bit I can't use s_list and s_signal for example. I solved the issue by<br>
> creating my own pd.lib and pd.def from pd.dll. So if you encounter the same<br>
> issue, you can simply do<br>
><br>
>> dumpbin /EXPORTS pd.dll > pd.exports<br>
>> lib /def:pd.def /out:pd.lib<br>
<br>
the problem with this is that it requires MSVC tools<br>
now, the target audience are MSVC-users (who else needs that pd.lib...),<br>
so they already have it.<br>
however, it would be nice if the shipped pd.lib (which uses the MinGW<br>
toolchain and doesn't have the MSVC tools) would contain all the<br>
required symbols.<br>
<br>
otoh, i do think that those global variables (`e.g. `s_float`) shouldn't<br>
be used in the first place: use the `gensym()` equivalents.<br>
<br>
gasdmr<br>
IOhannes<br>
<br>
> I hope it could help some of you. Perhaps we could add a documentation<br>
> somewhere about it... (I don't know if it useful...) I can help if needed.<br>
<br>
<br>
<br>
 <br>
______________________________<wbr>_________________<br>
Pd-dev mailing list<br>
</span><a href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a>[mailto:<a href="mailto:Pd-dev@lists.iem.at">Pd-<wbr>dev@lists.iem.at</a>]<br>
<a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-dev</a><br>
 _____________________________<wbr>__________________ Pd-dev mailing list <a href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a> <a href="https://lists.puredata.info/listinfo/pd-dev[https://lists.puredata.info/listinfo/pd-dev]" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-dev[https://lists.<wbr>puredata.info/listinfo/pd-dev]</a><br>
</blockquote></div><br></div>