From: Arno P. <ar...@pu...> - 2012-07-27 01:00:03
|
those comment markers are always emitted but only used for skeleton classes. For skeleton classes, XMLVM will inject the implementation between those comment markers into the generated code. This is meant as an internal mechanism and shouldn't be used by a developer. You can mark methods as 'native'. In those cases XMLVM will not emit an implementation and you can link a separate file to your executable that provides the implementation of the native methods. In this case you have to comply to XMLVM's name mangling and passing of parameters. As a first step, add a static native method to a class and compile this with XMLVM. The linker's unresolved external error will guide you what to do. Arno On 7/25/12 8:15 PM, JR Schmidt wrote: > I am curious as for the recommended approach for including native C/ObjC > implementations of Java functions, as is done for many of the > XMLVM-included classes. I am starting with an XMLVM skeleton project > and using ant. The ant "run" target generated C code from Java. But > modifying the resulting code in Xcode between the > //XMLVM_BEGIN_IMPLEMENTATION > //XMLVM_END_IMPLEMENTATION, > the resulting code is lost / overwriteen upon the next ant "run". I see > that XMLVM contains a "gen-c-wrappers" target which implies it preserves > changes, but modifying the build.xml to use this target didn't see to > help either. > > Any references / suggestions would be appreciated. > |