用java编写天天爱消除_JAVA Archives - 慢慢的回味

这是参照http://code.google.com/p/javacpp/#Accessing_Native_APIs 的例子。我把LegacyLibrary.h分成了 LegacyLibrary.h和LegacyLibrary.cpp。

JavaCPPTest click to download project files.

使用过程中易出错的地方:

1 编译的时候需要加入Native Lib的搜索路径:

“-Xcompiler”,”-L/root/workspace/JavaCPPFiles/Debug”

2 LegacyLibrary.java需要加上链接的库名:

@Platform(include = “LegacyLibrary.h”,link=”JavaCPPFiles”)

the lib file is libJavaCPPFiles, but here should be JavaCPPFiles.

3 如果需要用gdb debug:

The debug info should be added for g++ compile: -O0 -g3 (Do not add -s)

-O0: Optimization Level is none

-g3 : Debug Level is Maximum

-s:Omit all symbol information88x31.png

本作品采用知识共享署名 4.0 国际许可协议进行许可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值