This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

compile native Methods in a package


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]