GNUMAKE Expected exactly one source file error
Asked Answered
I

0

8

So I am working on building a NDK sample in Android Studio 2.2.2. The project use clapack (a math library) and it also has a testclapack.cpp at the same level as clapack folder. An Android.mk file is also at the same directory.

The content of the Android.mk file is:

LOCAL_PATH:= $(call my-dir)
export MAINDIR:= $(LOCAL_PATH)

include $(CLEAR_VARS)

include $(MAINDIR)/clapack/Android.mk

LOCAL_PATH := $(MAINDIR)

include $(CLEAR_VARS)
LOCAL_MODULE:= lapack
LOCAL_SHORT_COMMANDS := true
LOCAL_STATIC_LIBRARIES := tmglib clapack blas f2c
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_EXPORT_LDLIBS := $(LOCAL_LDLIBS)
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE:= testlapack
LOCAL_SRC_FILES:= testclapack.cpp
LOCAL_STATIC_LIBRARIES := lapack
include $(BUILD_SHARED_LIBRARY)

However, Sync Gradle leads to the error:

Gradle sync failed: GNUMAKE: Expected exactly one source file in compile step: com.android.build.gradle.external.gnumake.CommandClassifier$NativeCompilerBuildTool@6fd7d241 but received: D:/SDK/android/ndk-bundle/build//../platforms/android-19/arch-arm/usr/include E:/test/lapack/app/src/main/jni/testclapack.cpp

I think it is related to the Android.mk since if I remove the section for testlapack then the gradle sync is fine.

I need some help on how to make them can be compiled together since I need to call functions in testclapack.cpp.

Idea answered 31/1, 2017 at 5:25 Comment(1)
Did you get the real reason? or a solution?Kinna

© 2022 - 2024 — McMap. All rights reserved.