Hi everybody. I am developing SqueakDBX a openDBX C library. We are using FFI to call C functions. OpenDBX has always been compiled in linux and mac. But since the last version, it works under Windows using Cygwin or WinGW. I could test the library and works well (in windows). It has been generated the necessary .dlls. The problem is that theese .dlls files are in c:/cygwin/usr/lib/* . And, I can't "see" those functions from FFI.
In FFI I am using apicall instead of cdecl (the one I use under linux). I have never work with C under linux. Can someone help me? thanks, Mariano |
I am sorry, I forgot to tell the real error I have in FFI. When I try to run a simple test that uses FFI it call externalCallFailed with a message: "unable to find function address".
thanks in advance, mariano On Fri, Jun 20, 2008 at 1:48 AM, Mariano Martinez Peck <[hidden email]> wrote: Hi everybody. I am developing SqueakDBX a openDBX C library. We are using FFI to call C functions. OpenDBX has always been compiled in linux and mac. But since the last version, it works under Windows using Cygwin or WinGW. I could test the library and works well (in windows). It has been generated the necessary .dlls. The problem is that theese .dlls files are in c:/cygwin/usr/lib/* . And, I can't "see" those functions from FFI. |
2008/6/20 Mariano Martinez Peck <[hidden email]>:
> I am sorry, I forgot to tell the real error I have in FFI. When I try to run > a simple test that uses FFI it call externalCallFailed with a message: > "unable to find function address". > > thanks in advance, > > mariano > > > On Fri, Jun 20, 2008 at 1:48 AM, Mariano Martinez Peck > <[hidden email]> wrote: >> >> Hi everybody. I am developing SqueakDBX a openDBX C library. We are using >> FFI to call C functions. OpenDBX has always been compiled in linux and mac. >> But since the last version, it works under Windows using Cygwin or WinGW. I >> could test the library and works well (in windows). It has been generated >> the necessary .dlls. The problem is that theese .dlls files are in >> c:/cygwin/usr/lib/* . And, I can't "see" those functions from FFI. >> So, just copy .dll to same dir where image or squeak binary resides. But i think problem that resulting .dll using some other libraries which located under that dir. And to make it working you need to add this dir to PATH environment var. If i remember this should help. >> In FFI I am using apicall instead of cdecl (the one I use under linux). >> >> I have never work with C under linux. >> >> Can someone help me? >> >> thanks, >> >> Mariano > > > > > -- Best regards, Igor Stasenko AKA sig. |
On Fri, Jun 20, 2008 at 3:46 AM, Igor Stasenko <[hidden email]> wrote: 2008/6/20 Mariano Martinez Peck <[hidden email]>: Ok. I'll try this. I am sorry for my newbie questions, but I have never program C in windows. When I compiled openDBX with cygwin, it generated thees files libopendbx.a , libopendbx.la y libopendbx.dll.a I mean, there isn't a real XXX.dll so that windows can find it. Is this ok? very thanks, mariano
|
2008/6/20 Mariano Martinez Peck <[hidden email]>:
> > > On Fri, Jun 20, 2008 at 3:46 AM, Igor Stasenko <[hidden email]> wrote: >> >> 2008/6/20 Mariano Martinez Peck <[hidden email]>: >> > I am sorry, I forgot to tell the real error I have in FFI. When I try to >> > run >> > a simple test that uses FFI it call externalCallFailed with a message: >> > "unable to find function address". >> > >> > thanks in advance, >> > >> > mariano >> > >> > >> > On Fri, Jun 20, 2008 at 1:48 AM, Mariano Martinez Peck >> > <[hidden email]> wrote: >> >> >> >> Hi everybody. I am developing SqueakDBX a openDBX C library. We are >> >> using >> >> FFI to call C functions. OpenDBX has always been compiled in linux and >> >> mac. >> >> But since the last version, it works under Windows using Cygwin or >> >> WinGW. I >> >> could test the library and works well (in windows). It has been >> >> generated >> >> the necessary .dlls. The problem is that theese .dlls files are in >> >> c:/cygwin/usr/lib/* . And, I can't "see" those functions from FFI. >> >> >> >> So, just copy .dll to same dir where image or squeak binary resides. >> But i think problem that resulting .dll using some other libraries >> which located under that dir. >> And to make it working you need to add this dir to PATH environment var. >> If i remember this should help. > > Ok. I'll try this. I am sorry for my newbie questions, but I have never > program C in windows. When I compiled openDBX with cygwin, it generated > thees files libopendbx.a , libopendbx.la y libopendbx.dll.a > > I mean, there isn't a real XXX.dll so that windows can find it. Is this ok? > http://sourceforge.net/projects/mingw/ > very thanks, > > mariano > > > > > > >> >> >> In FFI I am using apicall instead of cdecl (the one I use under linux). >> >> >> >> I have never work with C under linux. >> >> >> >> Can someone help me? >> >> >> >> thanks, >> >> >> >> Mariano >> > >> > >> > >> > >> > >> >> >> >> -- >> Best regards, >> Igor Stasenko AKA sig. >> > > > > > -- Best regards, Igor Stasenko AKA sig. |
On Fri, Jun 20, 2008 at 1:26 PM, Igor Stasenko <[hidden email]> wrote:
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. Why do you think I could use MinGW? which are the difference between them (MinGW and Cygwin) ? I am asking just because I don't know. very thanks, Mariano
|
2008/6/20 Mariano Martinez Peck <[hidden email]>:
|
Excellent!!! Very thanks. As fast as I could, I will test it using WinGW and I will let you know the results.
thanks a lot, Mariano On Fri, Jun 20, 2008 at 1:44 PM, Hernán Morales <[hidden email]> wrote:
|
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:
Anyway, suppose I cannot use MinGW or imagine MinGW doesn'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. I have this: - OpenDBX library -> c:\mariano\opendbx-1.3.10\ - Cygwin -> c:\cygwin\ - MySQL -> c:\MySQL\ - Postgres -> c:\PostgreSQL\ - PATH variable: .....;c:\msys\1.0\bin\;c:\cygwin\bin\;C:\MySQL\bin After compiling, I have in c:\cygwin\usr\local\lib\ these files: libopendbx.a, libopendbx.a.dll, libopendbx.la, libopendbxplus.a, libopendbxplus.a.dll and libopendbxplus.la. There are also, theese folders: c:\cygwin\usr\local\lib\opendbx\ with these files: cygpgsqlbackend-1.dll, libpgsqlbackend.a, libpgsqlbackend.la and libpgsqlbackend.a.dll c:\cygwin\usr\local\lib\pkgconfig\ with file: opendbx.pc Now, what should I do with this? is this right? very thanks, Mariano On Fri, Jun 20, 2008 at 5:20 PM, Mariano Martinez Peck <[hidden email]> wrote: Excellent!!! Very thanks. As fast as I could, I will test it using WinGW and I will let you know the results. |
Free forum by Nabble | Edit this page |