<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Sorry for the "-hdi" typo... As I said, I don't think anyone ever
compiled and tested this on Windows, so I'm not surprised the
binary fails for you. If you like to investigate it further,
please go ahead! I might take a look myself in the future, but I'm
terribly busy at the moment.</p>
<p>Christof<br>
</p>
<div class="moz-cite-prefix">On 02.02.2020 19:44, ffdd cchh wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAO_HSB6AnTJ-HxQYQrKNPWjQF9hNRsuQReCtkyXe+Tq6zOGUCA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Ok, I did Christof's step c) and copied those dummy
functions (and basically commented out anything but a
debug_post() inside "hidio_devices()" and "hidio_elements()",
and indeed got a binary. But, it's no use.
<div><br>
</div>
<div>I try to get some data on why it crashes but it just says
'segmentation fault':
<div><br>
</div>
<div>```<br>
<div>camarahalac.1@ACD-NC054624 MINGW64 ~/Desktop<br>
$ /c/Users/camarahalac.1/Downloads/pd-0.50-2/bin/pd.exe -d
4 -stderr -open
/c/Users/camarahalac.1/Downloads/pd-0.50-2/extra/hidio/hidio-help.pd<br>
Segmentation fault<br>
</div>
<div>```</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Feb 2, 2020 at 12:38
PM ffdd cchh <<a href="mailto:camarafede@gmail.com"
moz-do-not-send="true">camarafede@gmail.com</a>> 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">You
are right! I now have undefined references only on hidio.o:<br>
<br>
hidio.o: In function `hidio_write_event':<br>
Z:\Desktop\hidio/hidio.c:357: undefined reference to
`hidio_write_event_symbols'<br>
Z:\Desktop\hidio/hidio.c:336: undefined reference to
`hidio_write_event_ints'<br>
Z:\Desktop\hidio/hidio.c:347: undefined reference to<br>
`hidio_write_event_symbol_int'<br>
hidio.o: In function `hidio_setup':<br>
Z:\Desktop\hidio/hidio.c:643: undefined reference to
`hidio_devices'<br>
Z:\Desktop\hidio/hidio.c:644: undefined reference to
`hidio_elements'<br>
hidio.o:hidio.c:(.rdata$.refptr.hidio_elements[.refptr.hidio_elements]+0x0):<br>
undefined reference to `hidio_elements'<br>
hidio.o:hidio.c:(.rdata$.refptr.hidio_devices[.refptr.hidio_devices]+0x0):<br>
undefined reference to `hidio_devices'<br>
collect2.exe: error: ld returned 1 exit status<br>
make[1]: *** [Makefile:267: hidio.dll] Error 1<br>
make[1]: Leaving directory '/z/Desktop/hidio'<br>
make: *** [Makefile:303: all-recursive] Error 1<br>
<br>
<br>
<br>
<br>
On Sun, Feb 2, 2020 at 12:17 PM Martin Peach <<a
href="mailto:chakekatzil@gmail.com" target="_blank"
moz-do-not-send="true">chakekatzil@gmail.com</a>> wrote:<br>
><br>
> I'm not sure but I think -lhdi should be -lhid, since
it's a human interface device library.<br>
> See <a
href="https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/introduction-to-hid-concepts"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/introduction-to-hid-concepts</a><br>
><br>
> Martin<br>
><br>
> On Sun, Feb 2, 2020 at 12:04 PM ffdd cchh <<a
href="mailto:camarafede@gmail.com" target="_blank"
moz-do-not-send="true">camarafede@gmail.com</a>> wrote:<br>
>><br>
>> Hi Martin, Christof,<br>
>><br>
>> thanks both. Still no luck.<br>
>><br>
>> I managed through steps a) b) and d), with the
exception that I could not add "-lhdi", as it appears to not
be installed here. Is that pointing to this: <a
href="https://cran.r-project.org/web/packages/hdi/index.html"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://cran.r-project.org/web/packages/hdi/index.html</a>
?<br>
>><br>
>> The log now points to *many* undefined references on
mostly hidio_windows.c and on hidio.c (which I suspect is my
missing step c), for which I did not have time)<br>
>><br>
>> I attach the log here again.<br>
>><br>
>> I have hit a brick wall here so I will not pursue
this further unless there are other instructions I can follow.<br>
>><br>
>> Thanks for you help,<br>
>><br>
>> Best,<br>
>><br>
>> fd<br>
>><br>
>> On Fri, Jan 31, 2020 at 10:52 PM Christof Ressi <<a
href="mailto:info@christofressi.com" target="_blank"
moz-do-not-send="true">info@christofressi.com</a>> wrote:<br>
>>><br>
>>> The order of .o files doesn't matter. It's shared
and static libraries which sometimes have to be specified in a
certain order.<br>
>>><br>
>>> The actual problem was that<br>
>>><br>
>>> a) hidio_windows.c used _WINDOWS instead of
_WIN32 as a guard around the whole code, so hidio_windows.o
was empty.<br>
>>><br>
>>> b) then there was a wrong header
(<ddk/hidsdi.h> instead of <hidsdi.h>)<br>
>>><br>
>>> c) some methods are not implemented, so I copied
the dummy implementation from hidio_linux.c. It seems like
those methods are only relevant for OSX.<br>
>>><br>
>>> d) there were missing linker flags "-lhdi
-lSetupAPI".<br>
>>><br>
>>> Also, I couldn't get the autotools makefile to
work, so I just compiled manually on the command line. Finally
I got a binary :-)<br>
>>><br>
>>> To be honest, I don't think that anyone ever
compiled this code on Windows, so it is probably untested.
Anyway, when I have time I can clean this up and make a PR (or
just fork it). Then we probably need some testing before we
upload it to Deken...<br>
>>><br>
>>> Christof<br>
>>><br>
>>> On 01.02.2020 02:50, Martin Peach wrote:<br>
>>><br>
>>> Line 76 of the log:<br>
>>> gcc -DPD -g -O2 -I/z/Desktop/pure-data/src
-mms-bitfields -L/z/Desktop/pure-data/src
-L/z/Desktop/pure-data/bin -L/z/Desktop/pure-data/obj -s
-shared -o hidio.dll hidio.o hidio_types.o hidio_windows.o
-L/src -L/bin -L/obj -lpd<br>
>>> hidio.o: In function `hidio_tick':<br>
>>> Z:\Desktop\hidio/hidio.c:513: undefined reference
to `hidio_get_events'<br>
>>><br>
>>> hidio_tick is in hidio.o, which has compiled
successfully.<br>
>>> hidio_get_events is in hidio_windows.o, which
also exists; but the linker is linking three .o files, and
hidio_windows.o is the last one.<br>
>>> Perhaps switching hidio.o and hidio_windows.o in
that gcc command will let the linker find the symbols before
they are needed.<br>
>>><br>
>>> Martin<br>
>>><br>
>>><br>
>>><br>
>>> On Fri, Jan 31, 2020 at 5:29 PM ffdd cchh <<a
href="mailto:camarafede@gmail.com" target="_blank"
moz-do-not-send="true">camarafede@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi Christof,<br>
>>>><br>
>>>> Thanks! Yes, I found these threads on the
list:<br>
>>>><br>
>>>> <a
href="https://lists.puredata.info/pipermail/pd-list/2019-11/126348.html"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.puredata.info/pipermail/pd-list/2019-11/126348.html</a><br>
>>>> <a
href="https://lists.puredata.info/pipermail/pd-list/2019-10/126096.html"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.puredata.info/pipermail/pd-list/2019-10/126096.html</a><br>
>>>><br>
>>>> But, there are still no Windows version of
this external...<br>
>>>><br>
>>>> Github issue is up: <a
href="https://github.com/Benitoite/hidio/issues/2"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/Benitoite/hidio/issues/2</a><br>
>>>><br>
>>>> Hope something comes out of this thread! I am
sure there are enough Windows users out there in need of some
hid external.<br>
>>>><br>
>>>> Best,<br>
>>>><br>
>>>> f<br>
>>>><br>
>>>><br>
>>>> On Fri, Jan 31, 2020 at 4:57 PM Christof
Ressi <<a href="mailto:info@christofressi.com"
target="_blank" moz-do-not-send="true">info@christofressi.com</a>>
wrote:<br>
>>>>><br>
>>>>> I remember a similar thread on the list a
few months ago. I tried to compile it and gave up. The build
system for Windows seems to be broken and needs to be fixed
(and probably switched from automake to pd-lib-builder).
Unfortunately, I don't have time right now to work on this,
but you could file a bug report on the GitHub repo, so maybe
the maintainer will do it.<br>
>>>>><br>
>>>>> Christof<br>
>>>>><br>
>>>>> On 31.01.2020 21:05, ffdd cchh wrote:<br>
>>>>><br>
>>>>> Dear list,<br>
>>>>><br>
>>>>> I need to use external controllers via
USB with vanilla (say, a PS4 controller), and I have not found
a compiled version of [hidio] for Windows. Please, let me know
if there are ready-made options out there (feel free to change
subject line if that thread goes wild).<br>
>>>>><br>
>>>>> In the meantime, I am trying to compile
[hidio] for Windows. I'm on Windows 10.0.18362, x64-based PC.
I am using a MSYS terminal with MINGw64. I took the latest
code from Benitoite's repository (<a
href="https://github.com/Benitoite/hidio" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://github.com/Benitoite/hidio</a>)
and I am stuck with "undefined reference"s all over. I attach
here the console log.<br>
>>>>><br>
>>>>> I would very much welcome any idea on how
to approach this so I can use vanilla with my students :)<br>
>>>>><br>
>>>>> Best,<br>
>>>>><br>
>>>>> f<br>
>>>>><br>
>>>>><br>
>>>>>
_______________________________________________<br>
>>>>> <a href="mailto:Pd-list@lists.iem.at"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
>>>>><br>
>>>>>
_______________________________________________<br>
>>>>> <a href="mailto:Pd-list@lists.iem.at"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> <a href="http://fdch.github.io"
rel="noreferrer" target="_blank" moz-do-not-send="true">fdch.github.io</a><br>
>>>>
_______________________________________________<br>
>>>> <a href="mailto:Pd-list@lists.iem.at"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> <a href="mailto:Pd-list@lists.iem.at"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
>>><br>
>>> _______________________________________________<br>
>>> <a href="mailto:Pd-list@lists.iem.at"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> <a href="http://fdch.github.io" rel="noreferrer"
target="_blank" moz-do-not-send="true">fdch.github.io</a><br>
>> _______________________________________________<br>
>> <a href="mailto:Pd-list@lists.iem.at"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.puredata.info/listinfo/pd-list</a><br>
<br>
<br>
<br>
-- <br>
<a href="http://fdch.github.io" rel="noreferrer"
target="_blank" moz-do-not-send="true">fdch.github.io</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr"><a href="http://fdch.github.io"
target="_blank" moz-do-not-send="true">fdch.github.io</a></div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></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>