惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - 王庆

crosstool-ng搭建交叉编译环境注意事项 多重继承及虚继承中对象内存的分布 编写和调试Android下JNI程序流程 eclipse xml文件中按alt+/没有提示信息 Android NDK 工具链的使用方法(Standalone Toolchain) 使用gdb和gdbserver调试Android C/C++程序 openssl在多平台和多语言之间进行RSA加解密注意事项 LINUX开发使用的3个远程工具 NDK 链接第三方静态库的方法 动态生成程序集和类型 关于线程池的一段代码 理解ParseChildren用法 快速查找ASP.NET产生的临时文件 捕获ASP.NET程序发生的异常 Synchronized vs SyncRoot - 王庆 Exception vs ApplicationException 【转】Hashtable,ListDictionary,HybridDictionary比较 Monitor用法 - 王庆 C#多线程之Thread - 王庆
编译Android VNC Server
王庆 · 2013-08-29 · via 博客园 - 王庆

1,在如下地址checkout源代码,我checkout的版本为0.9.7
http://code.google.com/p/android-vnc-server/source/checkout

2,在源代码目录下,新建jni目录,将checkout的源代码都剪切至该目录

3,在jni目录,新建Application.mk文件,添加APP_ABI := aremabi armeabi-v7a,保存文件退出

4,修改LibVNCServer-0.9.7/libvncserver/main.c文件中的第245行,将sprintf(stderr,buf); 修改为sprintf(stderr,"%s",buf); 不然编译的时候会出错。

5,使用vi打开Android.mk,发现它需要使用第三方的库文件libz.so和libjpeg.a,libz.so在ndk中已经支持,我们需要先编译libjpeg,才能继续往下执行

6,去这里查看如何编译arm版的libjpeg(http://blog.csdn.net/gengshenghong/article/details/7016617

7,在jni目录项新建一个include文件夹,将libjpeg的头文件拷贝至该目录(jconfig.h, jerror.h, jmorecfg.h, jpeglib.h)

8,将编译的libjpeg.a静态库拷贝至jni目录

9,修改Android.mk文件的LOCAL_C_INCLUDE := $(LOCAL_PATH) $(LOCAL_PATH)/LibVNCServer-0.9.7/libvncserver $(LOCAL_PATH)/LibVNCServer-0.9.7 include 
注释掉 LOCAL_SHARED_LIBRARIES := libz 和 LOCAL_STATIC_LIBRARIES := libjpeg
添加LOCAL_LDLIBS := libjpeg.a -lz
保存修改。

10,使用vi打开include/jmorecfg.h文件,修改第263行代码,将其中的typedef enum { FALSE = 0, TRUE = 1 } boolean; 修改为:
typedef enum { false = 0, true = 1 } boolean; 不修改的话,会提示error: expected identifier before numeric constant错误。

11,至此,使用ndk-build就能编译androidvncserver了。

参考文章:http://xuxd32.blog.163.com/blog/static/48121933201172411850206/
http://stackoverflow.com/questions/15172387/error-while-installing-tiff-3-8-2
http://blog.csdn.net/gengshenghong/article/details/7016617
http://bbs.gfan.com/android-116468-1-1.html