Re: ld doesn't know about location of libjvm

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

 



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: <braden@xxxxxxxxxxxxx>
<http://endoframe.com>                    Jabber: <braden@xxxxxxxxxx>

--
fedora-devel-java-list mailing list
fedora-devel-java-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux