![]() This isn't a bug in the NDK build system, but it is an issue with how you are using it. LOCAL_SRC_FILES := SimpleTCPStream.cpp SocketsServer.cpp uuids.cpp ![]() Static Lib Android.mk LOCAL_PATH := $(call my-dir) Static Lib Application.mk APP_STL := gnustl_staticĪPP_MODULES := Collections-static Collections-shared LOCAL_LDLIBS := -llog -L$(PATH_TO_STATIC_LIB) -lCollections_statis LOCAL_SRC_FILES := ScreenCapSvc.cpp SnapshotController.cpp Makefiles where files are split into a static lib and executable that links against the libĮxecutable Application.mk APP_STL := gnustl_staticĮxecutable Android.mk LOCAL_PATH := $(call my-dir) LOCAL_SRC_FILES := ScreenCapSvc.cpp SnapshotController.cpp SimpleTCPStream.cpp SocketsServer.cpp uuids.cpp Makefile where all files are part of the same executable (WORKING) What am I missing here? Is there any way to force 'gnustl_static' to link ? The make files for reference: It seems to me as if "gnustl_static" is not linked with the executable although "APP_STL := gnustl_static" is specified. When spiting the logic into a thin executable and a staticlib (that the executable is linked against ) I get an "undefined reference to `std::terminate()'" Linker error. When compiling all CPP files as one project all goes fine, no linker error. Compilation fail with "undefined reference to `std::terminate()'" Linker error.ADB Exe is compiled having LOCAL_LDLIBS := -L$(PATH_TO_STATIC_LIB) -lstaticlib.Executable & static Lib are compiled having "APP_STL := gnustl_static" at Application.mk.The ADB Tool minus the functionality moved out to the static lib.A static library encapsulating general purpose functionality.The ADB tool of Use-case 1 is split into two separate projects.Executable is successfully compiled and running.Executable is compiled having "APP_STL := gnustl_static" at Application.mk.ADB Cmdline executable ( no Java / APK ) is consist of several C++ files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |