This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
compile native Methods in a package
- To: java at gcc dot gnu dot org
- Subject: compile native Methods in a package
- From: Stefan Wanner <stefan dot wanner at gmx dot ch>
- Date: Tue, 23 Oct 2001 13:14:34 +0200
hello
i have problems to compile native code (cni) when it belongs to a class
which is in a package. i do something like this in the root of my packages:
gcj -C path/to/myprog.java
gcjh path/to/myprog
gcj -c path/to/myprog.class -o path/to/myprog.o
g++ -c path/to/myprognat.cc -o path/to/myprognat.o
in the last step the compiler complains about this:
syntax error before `::' token
is use this code:
myprog.java:
package path.to;
class myprog.java {
public native void x();
}
myprognat.cc:
#include <gcj/cni.h>
#include "myprog.h"
void path::to::myprog::x(){
}
what am i doing wrong?? i can't figure it out. please help!
thanks
stefan