Here I am again. I have been trying to compile OpenDBX with both of them: Cygwin and MinGW. As I have already told you before, with cygwin openDBX compiles perfectly (although I cannot see the dll from FFI), but I had some problems with MinGW. These problems are because OpenDBX does not use any cross-platform socket library wrapper but use native Unix socket libraries. So, I cannot compile this with MinGW. I could, but I have to do this: <br>
<br>Anyway, suppose I cannot use MinGW or imagine MinGW doesn&#39;t exist, can I use cygwin with FFI? I mean, can I compile something with cygwin so that FFI can use is? If so, how can I do this? I ask because I know cygwin applications must be distributed with a cygwin dll.<br>
<br>I have this:<br><br>- OpenDBX library -&gt; c:\mariano\opendbx-1.3.10\<br>- Cygwin -&gt; c:\cygwin\<br>- MySQL -&gt; c:\MySQL\<br>- Postgres -&gt; c:\PostgreSQL\<br>- PATH variable: .....;c:\msys\1.0\bin\;c:\cygwin\bin\;C:\MySQL\bin<br>
<br><br>After compiling, I have in c:\cygwin\usr\local\lib\ these files: libopendbx.a, libopendbx.a.dll, <a href="http://libopendbx.la">libopendbx.la</a>, libopendbxplus.a, libopendbxplus.a.dll and <a href="http://libopendbxplus.la">libopendbxplus.la</a>. <br>
There are also, theese folders: c:\cygwin\usr\local\lib\opendbx\ with these files: cygpgsqlbackend-1.dll, libpgsqlbackend.a, <a href="http://libpgsqlbackend.la">libpgsqlbackend.la</a> and libpgsqlbackend.a.dll<br>c:\cygwin\usr\local\lib\pkgconfig\ with file: opendbx.pc<br>
<br>Now, what should I do with this? is this right?<br><br>very thanks,<br><br>Mariano<br><br><div class="gmail_quote">On Fri, Jun 20, 2008 at 5:20 PM, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Excellent!!!&nbsp; Very thanks. As fast as I could, I will test it using WinGW and I will let you know the results.<br>
<br>thanks a lot,<br><font color="#888888"><br>Mariano</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Fri, Jun 20, 2008 at 1:44 PM, Hernán Morales &lt;<a href="mailto:hernan.morales@gmail.com" target="_blank">hernan.morales@gmail.com</a>&gt; wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div class="gmail_quote"><div><div></div><div>2008/6/20 Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div>On Fri, Jun 20, 2008 at 1:26 PM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div><div></div><div>2008/6/20 Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Jun 20, 2008 at 3:46 AM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2008/6/20 Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; I am sorry, I forgot to tell the real error I have in FFI. When I try to<br>
&gt;&gt; &gt; run<br>
&gt;&gt; &gt; a simple test that uses FFI it call externalCallFailed with a message:<br>
&gt;&gt; &gt; &quot;unable to find function address&quot;.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; thanks in advance,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; mariano<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Fri, Jun 20, 2008 at 1:48 AM, Mariano Martinez Peck<br>
&gt;&gt; &gt; &lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Hi everybody. I am developing SqueakDBX a openDBX C library. We are<br>
&gt;&gt; &gt;&gt; using<br>
&gt;&gt; &gt;&gt; FFI to call C functions. OpenDBX has always been compiled in linux and<br>
&gt;&gt; &gt;&gt; mac.<br>
&gt;&gt; &gt;&gt; But since the last version, it works under Windows using Cygwin or<br>
&gt;&gt; &gt;&gt; WinGW. I<br>
&gt;&gt; &gt;&gt; could test the library and works well (in windows). It has been<br>
&gt;&gt; &gt;&gt; generated<br>
&gt;&gt; &gt;&gt; the necessary .dlls. The problem is that theese .dlls files are in<br>
&gt;&gt; &gt;&gt; c:/cygwin/usr/lib/* . And, I can&#39;t &quot;see&quot; those functions from FFI.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; So, just copy .dll to same dir where image or squeak binary resides.<br>
&gt;&gt; But i think problem that resulting .dll using some other libraries<br>
&gt;&gt; which located under that dir.<br>
&gt;&gt; And to make it working you need to add this dir to PATH environment var.<br>
&gt;&gt; If i remember this should help.<br>
&gt;<br>
&gt; Ok. I&#39;ll try this. I am sorry for my newbie questions, but I have never<br>
&gt; program C in windows. When I compiled openDBX with cygwin, it generated<br>
&gt; thees files libopendbx.a , <a href="http://libopendbx.la" target="_blank">libopendbx.la</a> y libopendbx.dll.a<br>
&gt;<br>
&gt; I mean, there isn&#39;t a real XXX.dll so that windows can find it. Is this ok?<br>
&gt;<br>
<br>
</div></div>why not just build a .dll with mingw tools?</blockquote></div></div><div><br><br>Igor: Thanks a lot for the answer. Norbert (openDBX author) tell me that openDBX can be compiled with both of them: cygwin and winGW. As I know cygwin I tried with it and not with winGW.<br>



<br>Why do you think I could use MinGW? which are the difference between them (MinGW and Cygwin) ?</div></div></blockquote></div></div><div><br><a href="http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin" target="_blank">http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin</a><br>


<br>&nbsp;</div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><br><br>I am asking just because I don&#39;t know. <br>


<br>very thanks,<br><font color="#888888"><br>Mariano<br><br>&nbsp;</font></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
<a href="http://sourceforge.net/projects/mingw/" target="_blank">http://sourceforge.net/projects/mingw/</a><br>
<div><br>
&gt; very thanks,<br>
&gt;<br>
&gt; mariano<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt; In FFI I am using apicall instead of cdecl (the one I use under linux).<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I have never work with C under linux.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Can someone help me?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; thanks,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Mariano<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Best regards,<br>
&gt;&gt; Igor Stasenko AKA sig.<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div>--<br>
<div><div></div><div>Best regards,<br>
Igor Stasenko AKA sig.<br>
</div></div><br><br>
<br></blockquote></div></div><br>
<br><br>
<br></blockquote></div></div><br>
<br><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>