Build sample/hello-jni in Windows/Cygwin

2,574 views
Skip to first unread message

technicware

unread,
Apr 28, 2012, 4:01:27 PM4/28/12
to andro...@googlegroups.com
Hi,

Has anyone successfully compiled the sample/hello-jni under Windows/Cygwin?

1) After a few attempts, I realize that you cannot run ndk-build inside a Cygwin shell. You must run ndk-build.cmd inside a MSDOS command window. The documentation should have mention this obvious pitfall.

2) First attempt to build hello-jni looks like this:

C:\java\android-ndk-r7b\samples\hello-jni>path=c:\cygwin\bin;%path%
C:\java\android-ndk-r7b\samples\hello-jni>\java\android-ndk-r7b\ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [libs/armeabi/gdbserver] Error 1

3) Second and later attempt looks like this:

C:\java\android-ndk-r7b\samples\hello-jni>c:\java\android-ndk-r7b\ndk-build
make: *** [clean-installed-binaries] Error 127

4) Building hello-jni on Linux looks like this:

/opt/android-ndk-r7c/samples/hello-jni>$NDK/ndk-build
Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile thumb  : hello-jni <= hello-jni.c
SharedLibrary  : libhello-jni.so
Install        : libhello-jni.so => libs/armeabi/libhello-jni.so

It seems so wrong that a simple sample cannot be built under Windows/Cygwin. Has anyone one in Google tested this?

Thanks

--technicware

David Turner

unread,
May 3, 2012, 11:21:18 AM5/3/12
to andro...@googlegroups.com
On Sat, Apr 28, 2012 at 10:01 PM, technicware <techn...@gmail.com> wrote:
Hi,

Has anyone successfully compiled the sample/hello-jni under Windows/Cygwin?

1) After a few attempts, I realize that you cannot run ndk-build inside a Cygwin shell. You must run ndk-build.cmd inside a MSDOS command window. The documentation should have mention this obvious pitfall.


No, ndk-build should still work with cygwin, what kind of errors did you get? Maybe this is related to your installation.
 
2) First attempt to build hello-jni looks like this:

C:\java\android-ndk-r7b\samples\hello-jni>path=c:\cygwin\bin;%path%
C:\java\android-ndk-r7b\samples\hello-jni>\java\android-ndk-r7b\ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [libs/armeabi/gdbserver] Error 1


You're trying to use cygwin programs with ndk-build.cmd, this cannot work. Do not put C:\cygwin\bin in your path, then try to launch ndk-build again.
 
3) Second and later attempt looks like this:

C:\java\android-ndk-r7b\samples\hello-jni>c:\java\android-ndk-r7b\ndk-build
make: *** [clean-installed-binaries] Error 127

4) Building hello-jni on Linux looks like this:

/opt/android-ndk-r7c/samples/hello-jni>$NDK/ndk-build
Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile thumb  : hello-jni <= hello-jni.c
SharedLibrary  : libhello-jni.so
Install        : libhello-jni.so => libs/armeabi/libhello-jni.so

It seems so wrong that a simple sample cannot be built under Windows/Cygwin. Has anyone one in Google tested this?

Thanks


--technicware

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/kmnrVe1xpyYJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

technicware

unread,
May 4, 2012, 11:25:04 AM5/4/12
to andro...@googlegroups.com
Digit,

Thanks for the tip, but don't you see the contradiction? Using NDK on Windows requires Cygwin, but you must NOT put cygwin/bin in your Windows PATH. I guess NDK look for Cygwin from the Windows registry.

I would make the BASH script ndk-build compatible with Cygwin and remove or marginalize ndk-build.cmd.

--Michael
To unsubscribe from this group, send email to android-ndk+unsubscribe@googlegroups.com.

David Turner

unread,
May 4, 2012, 11:46:42 AM5/4/12
to andro...@googlegroups.com
On Fri, May 4, 2012 at 5:25 PM, technicware <techn...@gmail.com> wrote:
Digit,

Thanks for the tip, but don't you see the contradiction? Using NDK on Windows requires Cygwin, but you must NOT put cygwin/bin in your Windows PATH. I guess NDK look for Cygwin from the Windows registry.

No:
  • the NDK doesn't require Cygwin on Windows, you can build with ndk-build.cmd from the Windows command prompt.
  • however, when doing this, you should *not* have the Cygwin bin directory in your path
 
I would make the BASH script ndk-build compatible with Cygwin and remove or marginalize ndk-build.cmd.


ndk-build should *already* compatible with Cygwin, or else it's a bug. Please provide more information about why you can't use it in your setup, for example what is the output of "ndk-build NDK_LOG=1" ?

 
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/n5MBIE7bCOoJ.

To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.

technicware

unread,
May 4, 2012, 6:04:53 PM5/4/12
to andro...@googlegroups.com
Digit,


On Friday, May 4, 2012 8:46:42 AM UTC-7, Digit wrote:

Thanks for the tip, but don't you see the contradiction? Using NDK on Windows requires Cygwin, but you must NOT put cygwin/bin in your Windows PATH. I guess NDK look for Cygwin from the Windows registry.

No:
  • the NDK doesn't require Cygwin on Windows, you can build with ndk-build.cmd from the Windows command prompt.
  • however, when doing this, you should *not* have the Cygwin bin directory in your path
It's nice to know NDK doesn't need Cygwin, but that contradicts what one read from this NDK overview:

  http://developer.android.com/sdk/ndk/overview.html

Windows is always mentioned with Cygwin. Perhaps the doc needs to be updated (starting from which version NDK no longer require Cygwin).

 
I would make the BASH script ndk-build compatible with Cygwin and remove or marginalize ndk-build.cmd.

ndk-build should *already* compatible with Cygwin, or else it's a bug. Please provide more information about why you can't use it in your setup, for example what is the output of "ndk-build NDK_LOG=1" ?
 
Here is the output of building hello-jni in Cygwin bash prompt using the Windows version of r7b download:

/cygdrive/c/java/android-ndk-r7b>NDK=$PWD
/cygdrive/c/java/android-ndk-r7b>cd samples/hello-jni/
/cygdrive/c/java/android-ndk-r7b/samples/hello-jni>$NDK/ndk-build NDK_LOG=1
Android NDK: NDK installation path auto-detected: '/cygdrive/c/java/android-ndk-r7b'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Found /bin/uname.exe on Windows host
Android NDK: uname -s returned: CYGWIN_NT-5.1
Android NDK: Cygwin detected: CYGWIN_NT-5.1 D430m 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin
Android NDK:  Host operating system detected: cygwin
Android NDK: Host CPU was auto-detected:
Android NDK: HOST_TAG set to windows-
Android NDK: Host tols prebuilt directory not found
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'awk' tool: awk
Android NDK: Host 'awk' test returned: Pass
Android NDK:  Probing for 'cygpath' program
Android NDK:  'cygpath' found as: /usr/bin/cygpath
Using cygwin substitution rules:
/cygdrive/d => D:
/cygdrive/D => D:
/usr/lib => C:/cygwin/lib
/usr/bin => C:/cygwin/bin
/c => C:
/C => C:
/ => C:/cygwin
Android NDK:  This NDK supports the following target architectures and ABIS:
Android NDK:    arm: armeabi armeabi-v7a
Android NDK:    x86: x86
Android NDK:  This NDK supports the following toolchains and target ABIs:
Android NDK:    arm-linux-androideabi-4.4.3:  armeabi armeabi-v7a
Android NDK:    x86-4.4.3:  x86
Android NDK: Found platform root directory: /cygdrive/c/java/android-ndk-r7b/platforms
Android NDK: Found supported platforms: android-14 android-3 android-4 android-5 android-8 android-9
Android NDK: PLATFORM android-14 supports: arm x86
Android NDK:   ABI arm sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-14/arch-arm
Android NDK:   ABI x86 sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-14/arch-x86
Android NDK: PLATFORM android-3 supports: arm x86
Android NDK:   ABI arm sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-3/arch-arm
Android NDK:   ABI x86 sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-3/arch-x86
Android NDK: PLATFORM android-4 supports: arm x86
Android NDK:   ABI arm sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-4/arch-arm
Android NDK:   ABI x86 sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-4/arch-x86
Android NDK: PLATFORM android-5 supports: arm x86
Android NDK:   ABI arm sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-5/arch-arm
Android NDK:   ABI x86 sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm x86
Android NDK:   ABI arm sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-8/arch-arm
Android NDK:   ABI x86 sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-8/arch-x86
Android NDK: PLATFORM android-9 supports: arm x86
Android NDK:   ABI arm sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-9/arch-arm
Android NDK:   ABI x86 sysroot is: /cygdrive/c/java/android-ndk-r7b/platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK: Found project path: .
Android NDK: Parsing /cygdrive/c/java/android-ndk-r7b/build/core/default-application.mk
Android NDK:   Found APP_PLATFORM=android-8 in ./default.properties
Android NDK:   Using build script ./jni/Android.mk
Android NDK: Application 'local' *is* debuggable
Android NDK: Selecting debug optimization mode (app is debuggable)
Android NDK: Adding import directory: /cygdrive/c/java/android-ndk-r7b/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for 'armeabi' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/system'
Android NDK:   Probing /cygdrive/c/java/android-ndk-r7b/sources/cxx-stl/system/Android.mk
Android NDK:     Found in /cygdrive/c/java/android-ndk-r7b/sources/cxx-stl/system
make: /cygdrive/c/java/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: /cygdrive/c/java/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
Android NDK: Cygwin dependency file conversion script:
----- start of script ----
#!/bin/sh # AUTO-GENERATED FILE, DO NOT EDIT! if [ -f $1.org ]; then   sed -e 's!^C:/cygwin/lib!/usr/lib!ig;s! C:/cygwin/lib! /usr/lib!ig;s!^C:/cygwin/bin!/usr/bin!ig;s! C:/cygwin/bin! /usr/bin!ig;s!^C:/cygwin/!/!ig;s! C:/cygwin/! /!ig;s!^D:!/cygdrive/d!ig;s! D:! /cygdrive/d!ig;s!^C:!/c!ig;s! C:! /c!ig;' $1.org > $1 && rm -f $1.org fi
------ end of script -----

Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile thumb  : hello-jni <= hello-jni.c
/bin/sh: /cygdrive/c/java/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows-/bin/arm-linux-androideabi-gcc: No such file or directory
make: *** [obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 127


Angel Segura

unread,
May 4, 2012, 6:53:36 PM5/4/12
to andro...@googlegroups.com
The NDK on windows works fine as of NDK-r6 version (I just move from it a week ago).
The problem you are experiencing must be a configuration related feature: a missing file, a corrupted file, a bad project configuration file. For a fresh/clean kick start, I would recommend you the NVIDIA Tegra Android Development SDK. It ussually comes with the latest working NDK version, plus, the android SDK, plus, an installation with eclipse ready with the CDT and ADT plugin to develop native activities. The eclipse IDE version of the installation comes with a builtin plugin that has configured the post steps to compile your code, so no need for a terminal window and having to manage all those nasty configuration files.

I hope you can solve your problem.

Cheers.

2012/5/4 technicware <techn...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/Vgmb8zWhFhwJ.

technicware

unread,
May 4, 2012, 7:03:37 PM5/4/12
to andro...@googlegroups.com
I don't have any problem with Windows build (without Cygwin). It's working for me. I am just saying that the NDK overview is misleading about the requirement of Cygwin.

Thanks

David Turner

unread,
May 7, 2012, 5:59:30 AM5/7/12
to andro...@googlegroups.com
On Sat, May 5, 2012 at 12:04 AM, technicware <techn...@gmail.com> wrote:
Digit,


On Friday, May 4, 2012 8:46:42 AM UTC-7, Digit wrote:

Thanks for the tip, but don't you see the contradiction? Using NDK on Windows requires Cygwin, but you must NOT put cygwin/bin in your Windows PATH. I guess NDK look for Cygwin from the Windows registry.

No:
  • the NDK doesn't require Cygwin on Windows, you can build with ndk-build.cmd from the Windows command prompt.
  • however, when doing this, you should *not* have the Cygwin bin directory in your path
It's nice to know NDK doesn't need Cygwin, but that contradicts what one read from this NDK overview:

  http://developer.android.com/sdk/ndk/overview.html

Windows is always mentioned with Cygwin. Perhaps the doc needs to be updated (starting from which version NDK no longer require Cygwin).

Ah that's right, this documentation should be updated. Filed as http://code.google.com/p/android/issues/detail?id=30347
 
 
I would make the BASH script ndk-build compatible with Cygwin and remove or marginalize ndk-build.cmd.

ndk-build should *already* compatible with Cygwin, or else it's a bug. Please provide more information about why you can't use it in your setup, for example what is the output of "ndk-build NDK_LOG=1" ?
 
Here is the output of building hello-jni in Cygwin bash prompt using the Windows version of r7b download:

/cygdrive/c/java/android-ndk-r7b>NDK=$PWD
/cygdrive/c/java/android-ndk-r7b>cd samples/hello-jni/
/cygdrive/c/java/android-ndk-r7b/samples/hello-jni>$NDK/ndk-build NDK_LOG=1
Android NDK: NDK installation path auto-detected: '/cygdrive/c/java/android-ndk-r7b'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Found /bin/uname.exe on Windows host
Android NDK: uname -s returned: CYGWIN_NT-5.1
Android NDK: Cygwin detected: CYGWIN_NT-5.1 D430m 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin
Android NDK:  Host operating system detected: cygwin
Android NDK: Host CPU was auto-detected:
Android NDK: HOST_TAG set to windows-

Interesting, the problem is that the Host CPU detection failed (this should dump "x86" or "x86_64"),
as a consequence, HOST_TAG is set to "windows-" instead of "windows" or "windows-x86", and the rest fails because it can't find any toolchain programs.
 
Looking at the build script's code, this looks like a bug. What does 'uname -m' returns on your Cygwin shell exactly?

A work around is to define HOST_ARCH=x86 in your environment before calling ndk-build. Hope this helps

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/Vgmb8zWhFhwJ.

technicware

unread,
May 7, 2012, 10:33:40 AM5/7/12
to andro...@googlegroups.com
Digit,

Here is the uname output on my Cygwin:

/c/java/android-ndk-r7c/build>uname -a

CYGWIN_NT-5.1 D430m 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin

Score 2 bugs for a newbie, good for me :)

Thanks

On Monday, May 7, 2012 2:59:30 AM UTC-7, Digit wrote:

On Sat, May 5, 2012 at 12:04 AM, technicware wrote:
Digit,

It's nice to know NDK doesn't need Cygwin, but that contradicts what one read from this NDK overview:

  http://developer.android.com/sdk/ndk/overview.html

Windows is always mentioned with Cygwin. Perhaps the doc needs to be updated (starting from which version NDK no longer require Cygwin).

Ah that's right, this documentation should be updated. Filed as http://code.google.com/p/android/issues/detail?id=30347
 
Here is the output of building hello-jni in Cygwin bash prompt using the Windows version of r7b download:


/cygdrive/c/java/android-ndk-r7b>NDK=$PWD
/cygdrive/c/java/android-ndk-r7b>cd samples/hello-jni/
/cygdrive/c/java/android-ndk-r7b/samples/hello-jni>$NDK/ndk-build NDK_LOG=1
Android NDK: NDK installation path auto-detected: '/cygdrive/c/java/android-ndk-r7b'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Found /bin/uname.exe on Windows host
Android NDK: uname -s returned: CYGWIN_NT-5.1
Android NDK: Cygwin detected: CYGWIN_NT-5.1 D430m 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin
Android NDK:  Host operating system detected: cygwin
Android NDK: Host CPU was auto-detected:
Android NDK: HOST_TAG set to windows-

David Turner

unread,
May 7, 2012, 11:08:17 AM5/7/12
to andro...@googlegroups.com
On Mon, May 7, 2012 at 4:33 PM, technicware <techn...@gmail.com> wrote:
Digit,

Here is the uname output on my Cygwin:

/c/java/android-ndk-r7c/build>uname -a

CYGWIN_NT-5.1 D430m 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin

Actually, I already know this (it's in the log above). I'm really curious to know what the output of "uname -m" is though.
In theory, it should be "i686", and then the build script would detect this as "x86" properly due to the following lines in build/core/init.mk

        UNAME := $(shell uname -m)
        ifneq (,$(findstring 86,$(UNAME)))
            HOST_ARCH := x86
        endif
        # We should probably should not care at all
        ifneq (,$(findstring Power,$(UNAME)))
            HOST_ARCH := ppc
        endif
        ifeq ($(HOST_ARCH),)
            $(call __ndk_info,Unsupported host architecture: $(UNAME))
            $(call __ndk_error,Aborting)
        endif

I.e. it would detect that the output contains a "86", and set  HOST_ARCH to "x86"
Note also that if HOST_ARCH was really empty, the script would abort with an error. The fact that it didn't probably means that the value is a space or something equally weird.

Score 2 bugs for a newbie, good for me :)

Actually, not sure this is a bug in the script or in your cygwin config, given that other people are capable of using this fine.
Quick question: Did you install Cygwin with Unix or DOS line-endings? Anything fancy you selected during installation?
 
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/BgzwB53tbQIJ.

technicware

unread,
May 8, 2012, 12:08:39 AM5/8/12
to andro...@googlegroups.com
Digit,

On Monday, May 7, 2012 8:08:17 AM UTC-7, Digit wrote:
...
Actually, I already know this (it's in the log above). I'm really curious to know what the output of "uname -m" is though.
In theory, it should be "i686", and then the build script would detect this as "x86" properly due to the following lines in build/core/init.mk

        UNAME := $(shell uname -m)


/c/java/android-ndk-r7c>uname -m
i686
/c/java/android-ndk-r7c>echo =`uname -m`=
=i686=
 

 I.e. it would detect that the output contains a "86", and set  HOST_ARCH to "x86"
Note also that if HOST_ARCH was really empty, the script would abort with an error. The fact that it didn't probably means that the value is a space or something equally weird.

Score 2 bugs for a newbie, good for me :)

Actually, not sure this is a bug in the script or in your cygwin config, given that other people are capable of using this fine.
Quick question: Did you install Cygwin with Unix or DOS line-endings? Anything fancy you selected during installation?
 
This Cygwin has been around for years. I am sure is in Unix line-ending. Loading any of one of the bash scripts in c:/cygwin/bin into notepad confirms that (shows one long wrapping line with no break).

Thanks
-----------

Matt

unread,
Jun 5, 2012, 9:14:01 AM6/5/12
to andro...@googlegroups.com
I have the exact same problem. I'm running Cygwin on Windows 7 64-bit. My log
states that HOST_TAG is being set to windows- and uname -m returns "i686".

Did you all ever find a work around or fix for this? I tried setting
HOST_ARCH to x86 and that didn't change anything. The log for ndk-build is
the same.

I have a stackoverflow.com question about it here:
http://stackoverflow.com/questions/10887868/ndk-build-arm-linux-androideabi-gcc-
command-not-found

technicware

unread,
Jun 5, 2012, 10:23:47 AM6/5/12
to andro...@googlegroups.com
Matt,

Let me talk about Cygwin later. To build in Windows, open a Windows command window (or cmd.exe, a.k.a. DOS prompt) and call ndk-build.cmd. For example,

  cd \java\android-ndk-r7c\samples\hello-jni
  ..\..\ndk-build

So far I found one bug about ndk-build.cmd. It cannot do clean. For example,

  ..\..\ndk-build clean
  ..\..\ndk-build

Does not rebuild the project. Compare it with a NDK running on Linux and you will see the difference.

To build in Cygwin, two conditions must be met:

1) The Cygwin shell must be started from cygwin.bat from a Windows command window (or cmd.exe, a.k.a. DOS prompt).

I run Cygwin openssh as a Windows service and login to Cygwin via SSH in PuTTY. A bash shell opened like this CANNOT build NDK. The cygwin build relies on environment variable setup by cmd.exe. Without the benefit of your favorite terminal emulator like PuTTY, there is no point of building on Cygwin.

2) The you must be the owner of everything the build reads/writes to. This is the most bad-ass-aspect of building on Cygwin. To do this:

2a) You must have previously run mkpasswd on Cygwin to copy all Windows user accounts into Cygwin.
2b) Run "ls -l" in the NDK directory and make sure your name is in the owner column for all files and folders.
2c) Run "ls -l" in the external project directory and make sure your name is in the owner column.

Now, you can build in Cygwin (btw clean also works):

/c/java/android-ndk-r7c/samples/hello-jni>../../ndk-build

Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Cygwin         : Generating dependency file converter script

Compile thumb  : hello-jni <= hello-jni.c
SharedLibrary  : libhello-jni.so
Install        : libhello-jni.so => libs/armeabi/libhello-jni.so

--Michael

Chris Stratton

unread,
Jun 5, 2012, 1:25:45 PM6/5/12
to android-ndk
On Jun 5, 10:23 am, technicware <technicw...@gmail.com> wrote:

> 1) The Cygwin shell must be started from *cygwin.bat* from a *Windows
> command window* (or cmd.exe, a.k.a. DOS prompt).
> 2) The you must be the owner of everything the build reads/writes to. This
> is the most bad-ass-aspect of building on Cygwin. To do this:
> 2a) You must have previously run mkpasswd on Cygwin to copy all Windows
> user accounts into Cygwin.

etc.

Probably not what you want to hear, but a few years before becoming
involved with android work, I went through the following progression
in developing for an embedded linux:

- Cygwin on company windows box

- Linux VM on company windows box

- This is silly. I now know how to mount smb shares even when they
have goofy names, I'm already using open office to exchange docs with
that guy with the old version of word whose files my version of word
chokes on, webmail more or less works, someone else took over the FPGA
aspect of the project, I can even cross-compile our windows firmer
updater tool from linux... so why don't I just run linux on my desk
and move the legacy tools to my lab bench machine?
Reply all
Reply to author
Forward
0 new messages