From: Hank W. <han...@ya...> - 2011-12-15 21:43:50
|
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! |