<div dir="ltr"><div>Hello Charles and first of all, thank you so mucho for replying. I really appreciate your help.</div><div><br></div><div>This is the guide I was talking about: <a href="http://lists.alioth.debian.org/pipermail/nut-upsdev/2016-April/007171.html">http://lists.alioth.debian.org/pipermail/nut-upsdev/2016-April/007171.html</a></div><div><br></div><div>All the versions of MinGW and msys plugins I'm using are exactly the ones listed on that guide written by Denis Serov. </div><div><br></div><div>The procedure I used to compile is also the same as Denis suggested, but I made some changes on my own in the "build NUT" step since I added the "nutdrv_atcl_usb.c" source file from the last version of NUT, not present in the latest Windows build. Those are:</div><div><br></div><div>- Patched file "<a href="http://nut-usbinfo.pl">nut-usbinfo.pl</a>" as otherwise it will abort the make process with an error. In the section "process the driver name" with the following code (same as latest NUT linux version):</div><div><br></div><div>elsif ($nameFile eq "nutdrv_atcl_usb.c") {<br>    $driver="nutdrv_atcl_usb";</div><div><br></div><div>- Patched the "<a href="http://makefile.am">makefile.am</a>" in the drivers folder so it will include the source in the build. I added nutdrv_atcl_usb to the USB_LIBUSB_DRIVERLIST and added the LDADD/CFLAGS.</div><div><br></div><div>NOTE:<u> I have no idea what those edits do.</u> The only thing I wanted is the compiler to see the new source and compile it. So I just blindly searched mentions of the driver inside all the latest linux build sources and tried to patch them the same way on the outdated windows port. The two files above were all I could find where the driver was mentioned.</div><div><br></div><div>Also made two minor changes to the source file itself, fixed one variable that was giving error at building (I think it was something like USB sleep that I fixed to 5000), and the SleepEx() function instead of the sleep() one since the windows port was redefining sleep() to Sleep() and this one doesn't return 0 once the time has elapsed. </div><div><br></div><div>For the build commands, I use as follows. I added the flag "--enable-maintainer-mode"  as I read in the developer guide to allow regeneration of the <a href="http://makefile.in">makefile.in</a>:</div><div><br></div><div><br></div><div>[shell]<br>    cd /home/Administrator/nut-2.6.5-7<br>    autogen.sh --enable-maintainer-mode<br>   ./configure --with-doc=html-single CPPFLAGS="-DWINVER=0x0501 -D_WIN32_WINNT=0x0501" --enable-maintainer-mode<br>    export XML_CATALOG_FILES=/mingw/etc/xml/catalog<br>    make<br>    cd /docs/man<br>    make html-man<br><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></div><div><br></div><div>Now in response to you suggestion; I have no idea what NUT Scanner does and if I need it or not. The only thing I want is to use this driver so I can manage my UPS with NUT, and if possible to publish the changes I made so other people can use it.</div><div><br></div><div>I will wait for your answer anxiously. It has been a week of hours of trial and error and making this to work would be so nice!</div><div><br></div><div>THANKS!<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 11, 2017 at 11:20 AM, Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Mar 10, 2017, at 5:25 PM, <a href="mailto:hamberthm@gmail.com">hamberthm@gmail.com</a> wrote:<br>
><br>
> UPDATE: I managed to build the windows port using a guide a user posted a while ago.<br>
<br>
</span>Which guide?<br>
<span><br>
> I’ve also corrected a couple of variables like the SleepEx() function instead of the sleep() used in Linux. I’ve successfully compiled the EXE for nutdrv_atcl_usb but when I execute it via upsdrvctl it gives the following output:<br>
><br>
> C:\MinGW\msys\1.0\home\<wbr>Administrator\nut-2.6.5-7\<wbr>drivers>nutdrv_atcl_usb<br>
> nutdrv_atcl_usb:./.libs/lt-<wbr>nutdrv_atcl_usb.c:233: FATAL: couldn't find nutdrv_atcl_usb.<br>
><br>
> Now I have no idea how to continue…<br>
><br>
<br>
</span>The lt-*.c part indicates that the problem is likely related to libtool. Do you need any of the functionality like nut-scanner which requires libtool? If not, it might be possible to reconfigure for a static build.<br>
<br>
It might help to see the ./configure parameters you used, plus any patches. Also, versions of the various MinGW/msys components would probably be useful for anyone else trying to build for Windows.</blockquote></div><br></div>