<html><head></head><body><div>Hi,</div><div><br></div><div>I switched from Cygwin to building with MinGW, and after 8 squid code modifications, mostly include and define settings but one flat out access violation crash, I now have Squid proxy running and accessible via browser on Windows :)</div><div><br></div><div>And now I have built the ecap library, successfully rebuilt squid with --enable-ecap,  and built the adapter.</div><div>All good!</div><div><br></div><div>However I'm at the apparent crux of getting the adapter loaded at squid run time and failing.</div><div><br></div><div>I understand that</div><div>(1) squid needs to link in the same exact ecap library binary that the adapter does so they can communicate correctly through that ecap,</div><div>(2) we don't want to statically link in the adapter to squid.exe,</div><div>(3) so that adapter needs to be a shared such library, but</div><div>(4) building with MinGW creates a static library. </div><div><br></div><div>And I see a comment output during make:</div><div><br></div><div><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);">><i> *** Warning: This system can not link to static lib archive
</i>><i> /usr/local/lib/libecap.la. *** I have the capability to make that
</i>><i> library automatically link in when *** you link to this library.
</i>><i> But I can only do this if you have a *** shared version of the
</i>><i> library, which you do not appear to have. *** But as you try to
</i>><i> build a module library, libtool will still create *** a static
</i>><i> module, that should work as long as the dlopening application ***
</i>><i> is linked with the -dlopen flag to resolve symbols at runtime.</i></pre></span><br></div><div><br></div><div>So I did use this ./configure for squid, specifying the dlopen:</div><div><br></div><div><span><div>./configure LDFLAGS="-dlopen=C:/MinGW/src/ecap_adapter_sample-1.0.0/src/.libs/ecap_adapter_modifying.la" --prefix=c:/squid  --enable-ecap --enable-default-hostsfile=none --disable-strict-error-checking  --enable-win32-service --disable-optimizations --enable-debug-cbdata --with-pidfile=/var/run/squid.pid --enable-delay-pools --disable-eui --with-filedescriptors=65536 --enable-removal-policies=lru,heap</div><div><br></div><div>my understanding further being that the dlopen will cause squid to not link in the adapter until run time even though that library is static. And since it is not a native Windows format library (not a dll) then squid has to run in a MinGW window. Correct?</div><div><br></div><div>Yet I still get:</div><div><span><div>2018/12/19 22:57:32| Loading Squid module from 'C:/MinGW/src/ecap_adapter_sample</div><div>-1.0.0/src/.libs/ecap_adapter_modifying.la'</div><div>2018/12/19 22:57:32| FATAL: dying from an unhandled exception: file not found</div><div>terminate called after throwing an instance of 'TextException'</div><div>  what():  file not found</div></span><br></div><div>If I change my squid.conf instead to load in .a instead of .la just as a test, I get this:</div><div><span><div>2018/12/20 08:39:58| Loading Squid module from 'C:/MinGW/src/ecap_adapter_sample</div><div>-1.0.0/src/.libs/ecap_adapter_modifying.a'</div><div>2018/12/20 08:39:58| FATAL: dying from an unhandled exception: %1 is not a valid</div><div> Win32 application.</div><div>terminate called after throwing an instance of 'TextException'</div><div>  what():  %1 is not a valid Win32 application.</div></span><br></div><div>So I know it's actually accessing that .la, which does exist at that location, yet still complains that "file not found".</div><div>Is it as well trying to link in another library that the adapter needs?</div><div><br></div><div>Russel</div><div><br></div></span><br></div><div class="ydp2d2447b1yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"></div></body></html>