第八天 java转Objective-C工具 J2ObjC
2016-06-04 20:05
573 查看
开源库 J2ObjC
https://github.com/google/j2objc
使用
Getting StartedFirst, either:
Download the current distribution from the Releases section and unzip it, or Get the source and build it. To translate a Java source file (Hello.java, for example):
public class Hello { public static void main(String[] args) { System.out.println("hello, world"); } }
$ j2objc Hello.java translating Hello.java Translated 1 file: 0 errors, 0 warnings
To compile the translated file:
$ j2objcc -c Hello.m
j2objcc is a wrapper script that invokes your C compiler (normally clang, aka LLVM, Apple’s C/C++/Objective-C compiler). To build the executable:
$ j2objcc -o hello Hello.o $ ./hello Hello hello, world
j2objcc forwards whatever options you specify for the Objective-C compiler. For example, to translate and build with debugging symbols, use the -g flag:
$ j2objcc -g -o hello Hello.m
相关文章推荐
- 细看网络仿真工具
- C#实现属于自己的QQ截图工具
- 详解SQL Server 2008工具SQL Server Profiler
- C#实现的SN快速输入工具实例
- DOS下的必备工具
- 基于C++自动化编译工具的使用详解
- 如何使用Strace调试工具
- 五个PHP程序员工具
- ASP.NET开发中经常用到10款工具软件介绍
- 发布一个高效的JavaScript分析、压缩工具 JavaScript Analyser
- 阻止网页挂马的若干工具小集合
- Java加密解密工具(适用于JavaSE/JavaEE/Android)
- 10个实用的脚本代码工具
- php文档工具PHP Documentor安装与使用方法
- Web前端开发工具――bower依赖包管理工具
- Android快速分析apk工具aapt的使用教程
- PHP性能分析工具XHProf安装使用教程
- 5个提高Linux开发效率的工具
- apache ab工具页面压力测试返回结果含义解释