2014-04-16 5 views
2

NDK 빌드를 수행하려고 할 때 다음 오류가 발생합니다. 아무도 도와 줄 수 있습니까?Android NDK가 -lGLESv를 찾을 수 없습니다.

"시작 Android C++ 게임 개발"에서 작성된 것과 정확히 같은 설정 지침을 수행했습니다. 9 제외한 모든 단계 :

"Click the NativeActivity node in the Application Nodes window and click Add once more. Enter the Name as android.app.lib_name and the Value as the LOCAL_MODULE name, which can be found in the Android.mk file in the project’s jni folder."

오류 : 오류 상태로

10:44:23 ** Incremental Build of configuration Default for project HelloDroid ** "C:\ndk\ndk-build.cmd" all Android NDK: WARNING:jni/Android.mk:HelloDroid-Test: non-system libraries in linker flags: -lGLESv Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES Android NDK:
or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK: current module [armeabi] SharedLibrary : libHelloDroid-Test.so C:/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lGLESv collect2: ld returned 1 exit status make.exe: * [obj/local/armeabi/libHelloDroid-Test.so] Error 1

10:44:23 Build Finished (took 226ms)

답변

2

문제점을 발견했습니다. 난 그냥 지금 Android.mk 를 편집하는 데 필요한 다음과 같습니다

LOCAL_PATH := $(call my-dir) 

include $(CLEAR_VARS) 

LOCAL_MODULE := hellodroid 
LOCAL_SRC_FILES := hellodroid.cpp 
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2 
LOCAL_STATIC_LIBRARIES := android_native_app_glue 

include $(BUILD_SHARED_LIBRARY) 

$(call import-module, android/native_app_glue) 
0

, 아니 LIB GLESv이 없습니다.

사용하는 OpenGL ES 버전은 1 또는 2입니까?

링커 플래그는 각각 -lGLESv1_CM-lGLESv2입니다.

+0

내가 OpenGL을 ES 2를 사용하고자하는,하지만 지정된 것을 일부러! 그리고 내 컴퓨터에 OpenGL ES와 같은 것을 설치하지 않았다. 어쩌면 내가 그렇게해야만한다.하지만 어떻게!? – lino