基本上常用的项目有两种,一种是Java Project,另一种是Web Project,下面就以这两种项目为例,来阐释如何在项目中加载dll文件。
Java中调用dll的方式
System.load()
java
/**
*Loads the native library specified by the filename argument. The filename argument must be an absolute path name.
*/
public static void load(String filename)
//等价于
Runtime.getRuntime().load(name)
由JDK的说明文继续阅读 »
今天代码写着写着就莫名闪退了,手机也没有“程序停止运行”的提示,logcat也没有看到蓝色的调用栈log,这样的闪退最是蛋疼了,还好必现。复现几次之后,终于从logcat中看到了一行可疑的log:A/Looper: Could not create epoll instance. errno=24,看起来又是在native层闪退了。本文就把这个问题的分析解决过程记录了下来。继续阅读 »
New features
Add native shell support for xmake.lua. .e.g add_ldflags("$(shell pkg-config --libs sqlite3)")
Enable pdb symbol files for windows
Add debugger support on windows (vsjitdebugger, ollydbg, windbg ... )
Add getenv interface for the global scope of xmake.lua
Add plugin for generating vstudio project file (vs继续阅读 »