Link problem when working with array and Object

Eric Gamess egamess@kanaima.ciens.ucv.ve
Mon Sep 6 13:05:00 GMT 1999


Hi,
I have a link problem.
I did a Java program:
///////////////////////// Pepe.java ///////////////////////////
class Pepe
{
 public static native void func(Object myObject1,
 int myArray[], Object myObject2, Object myObject3);
 
 public static void main(String args[])
 {
 int array[]={1, 2, 3};
 Pepe p=new Pepe();
 func(new Pepe(), array, new Pepe(), new Pepe());
 }
}
//////////////////////////////////////////////////////////////
and the C++ program:
///////////////////// PepeImpl.cc ///////////////////////////
#include <cni.h>
#include "Pepe.h"
void Pepe::func(java::lang::Object *myObject1, jintArray myArray,
 java::lang::Object *myObject2, java::lang::Object *myObject3)
{
} 
//////////////////////////////////////////////////////////////
I did:
 javac Pepe.java (OK)
 gcjh Pepe (OK)
 gcj -c Pepe.class (OK)
 gcj -Ipath1 -Ipath2 -Ipath3 -Ipath4 -c PepeImp.cc (OK)
 gcj --main=Pepe -o excecutable Pepe.o PepeImp.o (Link problem)
func__4PepePQ34java4lang6ObjectPt6JArray1ZiN21 (signatute of fun in Pepe.o)
func__4PepePQ34java4lang6ObjectPt6JArray1ZiT1T1 (signature of fun in
PepeImp.o)
The signature are differents ????
Eric.
*******************************************************************
Eric Gamess
Universidad Central de Venezuela
Postgrado de Ciencias de la Computacion
Caracas, Venezuela
E-mail: egamess@kanaima.ciens.ucv.ve
Tel: 605-22-93
*******************************************************************


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /