From: Arno P. <ar...@pu...> - 2011-12-16 20:08:50
|
you are venturing into some of the "dark areas" of XMLVM. .NET support is more in a prototype stage and would require some serious work. At this point the XMLVM pipeline is not capable of going from CLR to iOS. Let me be more specific and explain what is missing: the Java to iOS pipeline has the following intermediate steps: Java source -> Java .class file -> XMLVM_DEX -> C source. The term "XMLVM_DEX" stands for the internal XMLVM format using DEX (i.e., Android Dalvik) instructions. We use the DEXer tool from Android for this. The CLR pipeline is historically older and does not make use of the DEX instructions. The same pipeline for CLR is: .NET source (e.g., C#) -> .NET .exe -> XMLVM_CLR -> XMLVM_JVM -> Java .class file. "XMLVM_CLR" is XMLVM using CLR byte code instruction and "XMLVM_JVM" is XMLVM using Sun Microsystems stack-based byte code instructions. You might be able to go from C# to iOS in two steps: first cross-compile C# to a Java .class file and then do a second pass with XMLVM cross-compiling the .class file to C (iOS). Just a word of caution: the CLR to JVM pipeline is by no means feature complete. Another big issue is that while you might be able to cross-compile C# to C for iOS, this says nothing about the iOS API. If you want to use C# to write an iOS application, you also need a C# iOS API similar to the Java API we have in the org.xmlvm.iphone.* package. Long in short: a lot of work... Arno On 12/15/11 1:43 PM, Hank Williams wrote: > Hello, I’m experimenting with cross compiling C# apps to C for > iPhone / native Mac use. However I’m > running into errors with all cross compiling other than clr to xmlvm-clr. > > > Is this supported on OS X? Should I be using Windows instead? > > Here is my setup: > > -OS X 10.6.8 (fresh install – default options except Xcode) > -XCode 3.2.6 (with iPhone SDK) > -Java 1.6.0_29 > -xmlvm install path is “/usr” (which places it in “/usr/bin”) > > The following works great: > > -pulling xmlvm from svn > -building xmlvm using ant > -building all iPhone demos using “ant demos-iphone” > -installing using “ant install” > -and also running “xmlvm –in=some.exe –out=somedir”, which generates the > xmlvm-clr xml file > > However trying to use any other output type fails, here are > the specific issues: > > -target=objc – the code generation completes and the api is > in place, but every line of clr code contains the code ERROR(“clr:code”); > -target=java – the code generation completes and the api is in place, but every > line of clr code contains the code System.err.println(“clr:code”); > -target=c – the code generation fails with error “Couldn’t create node for System.Object” > > I believe all clr processing ultimately goes through the clr to xmlvm-jvm path, so I tried the following: > > -target=jvm – the code generation failed with error “Could > not create target process for target ‘JVM’” > > (please note I ran all of these with sudo) > > I’m guessing the jvm step failing is affecting all other xmlvm-jvm > to<X> paths, because they’re reading clr instead of jvm instructions. > > Regarding compiling to c, I checked out the xmlvm.jar and > sure enough the clr compatibility class files are not in there. It appears these only build when running “ant > eventHandlerCompatLib”, however the build script checks for .Net using Windows > paths. > > Even skipping that step in the script (as I noticed the eventHandlerCompatLib.exe > was pulled from svn, and already existed) resulted in build errors when > rerunning. The error was “path ${xmlvm.main} > does not exist”. > > Starting to butcher the paths only made things worse and I > realized I’m likely doing something wrong, which is causing these issues. > > Does anything standout as incorrect with my setup or build > process? > > Thanks for any help, it’s greatly appreciated! > > ------------------------------------------------------------------------------ > 10 Tips for Better Server Consolidation > Server virtualization is being driven by many needs. > But none more important than the need to reduce IT complexity > while improving strategic productivity. Learn More! > http://www.accelacomm.com/jaw/sdnl/114/51507609/ > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |