1

I try to build libiconv as an bibliothek accessible by an android-JNI.

I've found a lot of example makefiles to include in my Android.mk. The problem is, every time I run ndk-build I get the following error:

libiconv/libcharset/lib/localcharset.c:51:24: fatal error: langinfo.h: No such file or directory

I called ./configure in the libiconv-folder but I still can't find a langinfo.h inside of this folder.

I am working on Mac OSX Mountain Lion. Does anybody know what to do?

UPDATE: There is a langinfo.hin /usr/include

ashiaka
  • 3,994
  • 8
  • 32
  • 45

4 Answers4

1

I got the same situation while I build the xbmc for android. I just made a empty file "langinfo.h" in include directory. And works well.

Sangjin Yun
  • 311
  • 1
  • 7
0

<langinfo.h> is not part of Android NDK.

The <langinfo.h> header contains the constants used to identify items of langinfo data. You can safely copy your system header from /usr/include to your project's include directory to resolve the compilation error.

Note however that this could be only the first symptom. Android does not contain langinfo-compatible data at all, and provides completely different localization tools.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • thx for the suggestions. I already tried to copy the langinfo.h to my include folder. This leads to further errors which I couldn't resolve so far – ashiaka Oct 14 '12 at 06:45
0

You should be able to find langinfo.h under NDK_DIR/sources/android/support/include. Make sure to include this into your include path.

houqp
  • 761
  • 1
  • 8
  • 12
0

Try this

Modify libiconv/libcharset/config.h

comment this line 「#define HAVE_LANGINFO_CODESET 1」

then ndk-build again

enter image description here

DannyYang
  • 147
  • 1
  • 2
  • 15