compile native Methods in a package
Stefan Wanner
stefan.wanner@gmx.ch
Tue Oct 23 04:14:00 GMT 2001
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
More information about the Java
mailing list