compile question about dll of windows

lucian lucian@mediafusion.co.jp
Tue Apr 8 01:27:00 GMT 2003


On Mon, 7 Apr 2003 12:38:29 -0700 (PDT)
Frank Jacobs <forkjake@yahoo.com> wrote:

> Perhaps I'm late to the game, but I still thought that Java DLLs
> weren't working in Windows: you can create them via GCJ, but you
> can't actually use them in applications.
> 
> I looked back and saw that there has been some recent discussion on
> this, but there doesn't appear to be any resolution (e.g.
> http://gcc.gnu.org/ml/java/2003-04/msg00059.html). If I'm off base on
> this, can someone clarify where we are with this.
> 
> Thanks,
> 
> :-) Frank
> 

  Perhaps I`m not the right person to answer this since I do not have 
too much experience working with Windows.I was succesfull compiling KAWA and some 
wrappers for it with gcj into a dll and then using the API from c and c++ both with 
gcc under Cygwin and with Borland compiler with C++Builder (had to make a lib from dll but this 
worked too).
 The most difficult thing was getting the headers right and seting the right export symbols 
from dll. Then in most cases I had to load dlls at run time (i.e. LoadLibrary(..)) and get 
the functions I need (i.e. GetProcAddress()).Also for Borland compiler only c functions may 
be exportded from dll`s so I had to flatten the APIs I needed into c functions.

 So it is possible !

-- 
Lucian



More information about the Java mailing list