How to add a new .cpp file to, and then build, a c++ library for Android? -


i'm making unity3d plugin this c++ library android. ive gotten work in windows opening visual studio project library makers provided, adding new .cpp file api code , building dll. i'm wondering how can add new .cpp file library , build android. far have installed android sdk , ndk on machine ubuntu , built original library using ndk-build (as per these instructions) i'm guessing not simple copying .cpp file folder , building there androidmanifest.xml files , on.

the androidmanifest.xml file not pertinent ndk build.

you need find appropriate android.mk file. may need add file name local_src_files in make file, although may have set compile .cpp files in directory or more intelligent along lines. is, after all, regular make file.

see here info on android.mk file specifics.

edit:

i suppose should add local_src_files preceding relevant include $(build_shared_library) library intend build. each make file may contain arbitrary number of targets, although in simplest case it's 1 make file build library.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -