Android NDK with Visual Studio

后端 未结 6 450
猫巷女王i
猫巷女王i 2020-12-23 15:25

I\'d like to build some native libraries for android using the NDK (native development kit), but i\'d like to use Visual Studio 2010 to do it. I\'ve googled quite a bit but

6条回答
  •  一向
    一向 (楼主)
    2020-12-23 15:34

    I have not found a direct clean solution, here is my workaround.

    I develop my native code on VS as a static library, and use some test project to try it as a console aplication. When it is ok, from cygwin I use a little bash script that copies all needed files to the jni folder and launch the standard android ndk make command. (also copy some file to assets folder when needed), producing the executable in the right folder.

    To use the pthreads I have linked my projects to pthreads-win32.

    The only files I do not compile in VS are the jni code.

    I hope this can help you.

提交回复
热议问题