Loading...

fedora-devel-java-list@redhat.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[fedora-java] Re: ld doesn't know about location of libjvm Braden McDaniel Mon Oct 30 06:09:48 2006

On Fri, 27 Oct 2006 11:12:35 +0100, Andrew Haley wrote:

> Braden McDaniel writes:
>  > ld seems not to know about /usr/lib[64]/gcj-4.1.1; and as such cannot 
>  > find libjvm.so without a -L flag. Is this deliberate or a bug?
> 
> Please post a test case that shows this fault.

On this Fedora Core 6 x86_64 system, this program

  #include <jni.h>

  int main()
  {
    JNI_CreateJavaVM(0, 0, 0);
  }

cannot be linked with this command line:

  $ gcc -ljvm -o libjvm-test libjvm_test.c
  /usr/bin/ld: cannot find -ljvm
  collect2: ld returned 1 exit status

This command line succeeds:

  $ gcc -L/usr/lib64/gcj-4.1.1 -ljvm -o libjvm-test libjvm_test.c

-- 
Braden McDaniel                           e-mail: <[EMAIL PROTECTED]>
<http://endoframe.com>                    Jabber: <[EMAIL PROTECTED]>

--
fedora-devel-java-list mailing list
[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list