This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Link problem when working with array and Object
- To: java-discuss@sourceware.cygnus.com
- Subject: Link problem when working with array and Object
- From: Eric Gamess <egamess@kanaima.ciens.ucv.ve>
- Date: Mon, 6 Sep 1999 16:11:30 -0700 (PDT)
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
*******************************************************************