From: Paul P. <bay...@gm...> - 2011-03-28 15:59:42
|
XMLVM will translate Java code to Objective-C or C, but not C++. This is good though since C++ is an extension of C. As you say you are a C++ programmer looking to translate Xokoban to C++, I'm not sure XMLVM is what you're looking for. I.e. the idea is to write code in Java & it will work the same running as Objective-C or C++, but you shouldn't have to look at the Objective-C or C++ code, barring some exceptions. If you do look at the generated code, you can easily tell a human didn't write it, although with some XMLVM knowledge, you can read & understand it. That to say, if you are interested in writing C++, XMLVM is probably not the solution. If however, you are interested in writing Java, you've come to the right place. To answer your question, Java source files are *.java. When you compile them using "javac", they are converted into *.class. Those byte code files (think of them in some ways similar to *.exe) are what the JVM executes in Java proper & what XMLVM uses to translate to another language. So if you are interested in XMLVM, I recommend first acquainting yourself with Java proper. Possibly to get you started though, run "ant clean" first to get rid of some old files that may be causing 'package R does not exist'. Thanks, Paul On Mon, Mar 28, 2011 at 4:16 AM, Erez D <ere...@gm...> wrote: > I have just checked out xmlvm, and want to use it to compile android app to > c++ > I read the documentation, but still have problems understanding what to do. > > i have generated dist/xmlvm.jar using ant and openjdk > > BTW, I'm a c++ programmer, with small experiance in java. > > For example, i need help compiling xokoban (from xmlvm demo) to c++ > 1. according to the docs, xmlvm's input is *.class, but xokoban files are > *.java. do i just use javac to compile xokoban.java to xokoban.class (this > will make java bytcode. is it ok or dex is needed ? (if so, how do i > generate dex ?) ) > 2. trying 'javac Ball.java' from xokoban's directory: i get many error > messages of missing stuff, like 'package R does not exist'. is this because > of the order i am compiling or am i missing somthing. > > > can someone give me a small tutorials of how to generate c/cpp from xokoban > (ubuntu 10.10 64 bit). > > thanks, > erez. > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > |