From owner-freebsd-amd64@FreeBSD.ORG Thu May 10 09:13:54 2007 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 263ED16A405 for ; Thu, 10 May 2007 09:13:54 +0000 (UTC) (envelope-from ahcene.bendjoudi@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id DC65813C45E for ; Thu, 10 May 2007 09:13:53 +0000 (UTC) (envelope-from ahcene.bendjoudi@gmail.com) Received: by an-out-0708.google.com with SMTP id d23so121658and for ; Thu, 10 May 2007 02:13:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=rYF8ySNpPTQejK60+Vq9NpxM56fiSguvat7ptY+7lIkXRsYbzl79XzNXJbgfejYzfOkOBS8Z6e3JNb/eygB7AuSrs+sDVBuyOI2vfJS1YMtJwOJ8/xTW9Bd9dja9Q1XaeaJfLfqSc2cfFBpef4KqxfvXNB5XwWUG+7wYlAQVj8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=lhEVZkY5fmuzf5BnlU6XtX/vIxgdhsXSR76CJkSt7ARvOxpOnSIDgR/QU66Bnx1QtJxoBlRiOIwuKEWVChJoydaRmEmadKp89Ix7mkpRYXAh6NHZDfAS2+6osex0MisuWRerzDReXnAqI7vJK9fvG40+7c5nWVNPhQQ3ibOAuj8= Received: by 10.101.12.19 with SMTP id p19mr1076380ani.1178786698600; Thu, 10 May 2007 01:44:58 -0700 (PDT) Received: by 10.100.37.16 with HTTP; Thu, 10 May 2007 01:44:58 -0700 (PDT) Message-ID: <8715bcff0705100144t52f2bbbbsa2efcb96d9bfe196@mail.gmail.com> Date: Thu, 10 May 2007 10:44:58 +0200 From: "=?ISO-8859-1?Q?Ahc=E8ne_Bendjoudi?=" To: freebsd-amd64@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: relocation R_X86_64_32 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 09:13:54 -0000 Hello, I want to comunicate between to applications (java/c++). So i made necessary instructions, but when i tried to compile my code source with g++ it screen this message This same code worked well on an other machine (intell) : /------------------- -bash-2.05b$ g++ -o libTest.so -shared Test.cpp /usr/bin/ld: /tmp/ccUa8GTk.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /tmp/ccUa8GTk.o: could not read symbols: Bad value collect2: ld returned 1 exit status --------------------/ And when I recompiled with -fPIC : /-------------------- -bash-2.05b$ g++ -o libTest.so -shared -fPIC Test.cpp -bash-2.05b$ ls Test.class Test.cpp Test.java libTest.so Test.h --------------------/ So it seams that the libTest.so file was created, but when I tried to execute it : /------------------ -bash-2.05b$ java -Djava.library.path=. -classpath . Test Exception in thread "main" java.lang.UnsatisfiedLinkError: no Test in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at Test.(Test.java:3) --------------------/ some one can solve this Thanks in advance Ahcene