[gdome]Re: translating gdome to pascal?



Hello,

I am facing similar problems when linking C++-Builder executables with
the gdome dll. Now I have an idea what causes the crashes.

As I wrote yesterday, the dll works fine as long as you link it into
programs compiled with cygwin's "gcc". Unfortunalty, cygwin's linker "ld"
uses an import library (libgdome.dll.a) to link to the dll, whose format
is not understood by Borland's linker "ilink32". I suppose you are using
this same linker with delphi.

Borland's compiler comes with command line tools ("impdef", "implib") that
can extract exported functions from the gdome dll and build an import
library that "ilink32" understands. I suppose you have done that.

It seems that dll's built with cygwin may need some sort of initialization
that is not performed when they are used from a progam that was not linked
with "ld" using the cygwin import library. I searched through the cygwin
mailing list archive and that's what's reported in several places there.
See for example
http://sources.redhat.com/ml/cygwin/1998-02/msg00789.html
http://sources.redhat.com/ml/cygwin/2000-06/msg00996.html
http://sources.redhat.com/ml/cygwin/1998-02/msg00672.html
http://sources.redhat.com/ml/cygwin/1998-05/msg00495.html
http://sources.redhat.com/ml/cygwin/2001-03/msg01549.html
http://sources.redhat.com/ml/cygwin/1997-06/msg00375.html

My impression is that it is possible to use cygwin dll's from delphi
programs, though it could be tricky. If I do not get it to work by my own,
I'll soon ask on the cygwin mailing list.

> It does report, that only the Module XML is supported.
> Is the module Events NOT supported???

I'm currently only interested in the Core API, so I don't know. But I
noticed a test program "test-mevents" in the libgdome distribution, so it
might be supported.

> One question about the exception handling.
>
> Do the routines expect a pointer to a variable (@exc), that returns the
> exception code,
> or do they expect a pointer to a exception-handling procedure?
A pointer to an unsigned short variable.

> But as the code above does work, my declaration of GdomeException should
> be ok.

> What shall I pass for uri on Windows?
> Just the filename, or the filename with the full path, or what else?

Sorry, forgot to test this (writing mails with linux). At least relative
file names should work on every system. Absolute filenames without drive
letter and forward slashes may work for the current drive. You could
try //DRIVE/dir/file, //cygdrive/DRIVE/dir/file and
file:///DRIVE:/dir/file for full dos paths.

> Does anybody have a working trio of cywin1.dll, libxml2-2.45.dll and
> libgdome-0.6.9.dll?

It works fine for my ruby wrapper. But then ruby was translated with
cygwin.

> Any suggestions are wellcome.

In case it proves too difficult to link to this dll with native windows
compilers, I'm considering building an ole server that can be accessed
from any language. This won't happen soon, though.

Bye, Tobias





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]