----- Original Message ----- 
From: "Sisyphus"
.
.
>
> Unfortunaltely, whenever I do add 'JNI.o' to the command I still get
> "undefined reference to [EMAIL PROTECTED]'". I'll try and find
out
> why that happens .... MinGW's gcc normally has no trouble in linking to
MSVC
> '.lib' files.
>

Turns out the problem I was having was a bug with the version of ld.exe that
I was using. Once I installed a more recent version of ld.exe (by installing
MinGW's binutils-2.16.91-20060119 package), Inline-Java-0.51 built pretty
much straight out of the box.

One other thing I did was to copy Sun's jvm.lib to libjvm.a - as that was
the file that was being explicitly sought for linking purposes in the
building of JNI.dll. That seemed the simplest way to deal with that minor
hiccup - though ld.exe can equally link to a file named jvm.lib (if
instructed
to do so).

Then it was just a matter of running:
1) perl Makefile.PL J2SDK=/path/to/java
   I accepted the defaults for all prompts that were presented.

2) nmake java
   We usually use 'dmake' instead of 'nmake' with MinGW - in fact there's
   normally no reason to even have 'nmake' if one uses  MinGW - but
  'dmake java' simply stated  "`java' is up to date", so I went with 'nmake
  java' as per the instructions issued when running the Makefile.PL and
  found that 'nmake java' worked fine.

3) dmake
   The instructions issued when running the Makefile.PL specified that
   'nmake' should be  run, but we definitely need to run $Config{make}.

4) dmake test
   The instructions issued when running the Makefile.PL specified that
   'nmake test' should be run ... but we definitely need to run
  "$Config{make} test".

5) dmake install
   The instructions issued when running the Makefile.PL specified that
   'nmake install' should be run ... but we definitely need to run
  "$Config{make} install".

I haven't supplied any patches for any of that (as the workarounds are
simply *sooo* much easier :-) but Patrick, if you want to do something about
those points and need something checked (or need patches), then let me know
and I'll try to oblige.

Cheers,
Rob

Reply via email to