<div dir="ltr"><div>That is good way to share C library code. However, little thing.</div><div> Instead of giving error messages like "MaybeCompileLibrary: compile.sh not found.", give them like this:</div><div>"MaybeCompileLibrary: " & theShSpec & " not found."</div><div><br></div><div>That way the user knows what exactly could not be found and from where. Or in case of open source program, even like this:</div><div>System.Backtrace[0] & ": " & theShSpec & " not found."</div><div><br></div><div>This way the user knows immediately the line in the source code what gives the error.</div><div><br></div><div><br></div><div>Jussi<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 26, 2019 at 6:55 PM Cedron Dawg <<a href="mailto:cedron@exede.net">cedron@exede.net</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">I've whipped up a sample project which should be similar to your situation.<br>
<br>
This project shows:<br>
<br>
 * How easy it is to interface to a C shared library.<br>
<br>
 * My clever, but a bit complicated, way of compiling a C shared library from Gambas<br>
<br>
 * The difference between Gambas' ordinary string functions (ASCII) and the static String functions (UTF-8)<br>
<br>
You should note:<br>
<br>
 * The C code is oblivious to the UTF-8 encoding of the string constant.<br>
<br>
 * There is no conv function usage<br>
<br>
 * I use a string instead of allocated memory<br>
<br>
Hopefully this will clarify the issues at hand.<br>
<br>
Ced<br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>