Win7下NDKR7b&&Cygwin,编译libiconv-1.14

leer168 2012-03-19 11:39:16
http://www.shanzhashu.info/archives/220.html
我参照这个重复配置编译了5次,均失败
E:/libiconv-1.14/jni/include/iconv.h:53: error: declaration for parameter 'libic onv_t' but no such parameter
E:/libiconv-1.14/jni/include/iconv.h:31: error: declaration for parameter '_libi conv_version' but no such parameter
E:/libiconv-1.14/jni/lib/iconv.c:594: error: expected '{' at end of input
/cygdrive/d/Android/Win7/android-ndk-r7b/build/core/build-binary.mk:240: recipe for target `/cygdrive/e/libiconv-1.14/obj/local/armeabi/objs/iconv/lib/iconv.o' failed
make: *** [/cygdrive/e/libiconv-1.14/obj/local/armeabi/objs/iconv/lib/iconv.o]
...全文
507 15 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
leer168 2012-04-01
  • 打赏
  • 举报
回复
[Quote=引用 14 楼 的回复:]

引用 13 楼 的回复:

引用 12 楼 的回复:

引用 9 楼 的回复:

引用 8 楼 ncuboy045wsq 的回复:

楼主能教我怎么在win7下搭建NDK的开发环境吗?


可以啊,你说怎么帮你?

不好意思,前段时间有点忙,没看到。
如果可以的话,先谢谢了。你可以整个文档,说明一步步搭建win7下开发NDK的环境,下载工具的地址和如果搭建环境变……
[/Quote]

记性不行了啊,突然发现我早前就把自己的过程记录下来了
http://blog.csdn.net/leer168/article/details/6828866
看看能搭起来么
安卓机器人 2012-04-01
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 的回复:]

引用 12 楼 的回复:

引用 9 楼 的回复:

引用 8 楼 ncuboy045wsq 的回复:

楼主能教我怎么在win7下搭建NDK的开发环境吗?


可以啊,你说怎么帮你?

不好意思,前段时间有点忙,没看到。
如果可以的话,先谢谢了。你可以整个文档,说明一步步搭建win7下开发NDK的环境,下载工具的地址和如果搭建环境变量,如果运行程序。谢谢了啊!!!
……
[/Quote]
好的,真心谢谢你了!!
leer168 2012-03-31
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 的回复:]

引用 9 楼 的回复:

引用 8 楼 ncuboy045wsq 的回复:

楼主能教我怎么在win7下搭建NDK的开发环境吗?


可以啊,你说怎么帮你?

不好意思,前段时间有点忙,没看到。
如果可以的话,先谢谢了。你可以整个文档,说明一步步搭建win7下开发NDK的环境,下载工具的地址和如果搭建环境变量,如果运行程序。谢谢了啊!!!
[/Quote]

好吧,明天在公司整理一下发给你,如果成功我就放到Blog上
安卓机器人 2012-03-31
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 的回复:]

引用 8 楼 ncuboy045wsq 的回复:

楼主能教我怎么在win7下搭建NDK的开发环境吗?


可以啊,你说怎么帮你?
[/Quote]
不好意思,前段时间有点忙,没看到。
如果可以的话,先谢谢了。你可以整个文档,说明一步步搭建win7下开发NDK的环境,下载工具的地址和如果搭建环境变量,如果运行程序。谢谢了啊!!!
leer168 2012-03-28
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 的回复:]

请问一下,现在可以使用纯C++开发android应用吗?怎么看很多之前的帖子说只能开发DLL通过JNI调用?
[/Quote]

Exploring the native-activity Sample Application

The native-activity sample provided with the Android NDK demonstrates how to use the android_native_app_glue static library. This static library makes creating a native activity easier by providing you with an implementation that handles your callbacks in another thread, so you do not have to worry about them blocking your main UI thread. The main parts of the sample are described below:

The familiar basic structure of an Android application (an AndroidManifest.xml file, a src/ and res directories). The AndroidManifest.xml declares that the application is native and specifies the .so file of the native activity. See NativeActivity for the source or see the <ndk_root>/platforms/samples/native-activity/AndroidManifest.xml file.
A jni/ directory contains the native activity, main.c, which uses the android_native_app_glue.h interface to implement the activity. The Android.mk that describes the native module to the build system also exists here.
To build this sample application:

Create a new project in Eclipse from the existing sample source or use the android tool to update the project so it generates a build.xml file that you can use to build the sample.
In Eclipse:
Click File > New Android Project...
Select the Create project from existing source radio button.
Select any API level above Android 2.3.
In the Location field, click Browse... and select the <ndk-root>/samples/native-activity directory.
Click Finish.
On the command line:
Change to the <ndk-root>/samples/native-activity directory.
Run the following command to generate a build.xml file:
android update project -p . -s
Compile the native code using the ndk-build command.
cd <ndk-root>/platforms/samples/android-9/samples/native-activity
<ndk_root>/ndk-build
Build and install the application as you would a normal Android application. If you are using Eclipse, run the application to build and install it on a device. If you are using Ant, run the following commands in the project directory, then run the application on the device:
ant debug
adb install bin/NativeActivity-debug.apk


这是官网提供的,但是开发过程比较苦逼,很BT
http://developer.android.com/sdk/ndk/overview.html#samples
kabc1893 2012-03-28
  • 打赏
  • 举报
回复
请问一下,现在可以使用纯C++开发android应用吗?怎么看很多之前的帖子说只能开发DLL通过JNI调用?
octopus666 2012-03-26
  • 打赏
  • 举报
回复
之前也想用这个库 没编译通过
只好用android系统库/system/lib/libicuuc.so
leer168 2012-03-26
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 ncuboy045wsq 的回复:]

楼主能教我怎么在win7下搭建NDK的开发环境吗?
[/Quote]

可以啊,你说怎么帮你?
安卓机器人 2012-03-26
  • 打赏
  • 举报
回复
楼主能教我怎么在win7下搭建NDK的开发环境吗?
leer168 2012-03-26
  • 打赏
  • 举报
回复
网上已经有很多教程了,也许是环境发生变化了,我照着做总是不对。最后总算成功了,跟网上的好多版本,区别只是在第一步。
我的环境:Win7 64,NDK R7b,libiconv-1.14

第一步的
./configure
改为
./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
我编译成功,使用也正常

其他步骤可以参考这里
http://www.shanzhashu.info/archives/220.html
leer168 2012-03-25
  • 打赏
  • 举报
回复
能,周一到公司 再说那就
fox000002 2012-03-25
  • 打赏
  • 举报
回复
路过jf,学习解决方案
luke1215 2012-03-25
  • 打赏
  • 举报
回复
我来顶一下,能公布一下解决方案不?
leer168 2012-03-22
  • 打赏
  • 举报
回复
我自己已经解决了,谁过来顶一下,我给他分啊

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧