JavaEar 专注于收集分享传播有价值的技术资料

[solved]fatal error: gst/gst.h: No such file or directory

I am trying to import the gstreamer projects for android application. (http://docs.gstreamer.com/display/GstSDK/Android+tutorials). But, stuck with these problems.

The Error Messages :

fatal error: gst/gst.h: No such file or directory   
GStreamer cannot be resolved    Tutorial1.java  
make.exe: *** [gst-build/gstreamer_android.o] Error 1   
The import com.gstreamer cannot be resolved Tutorial1.java  

The Console Output :

23:40:21 **** Incremental Build of configuration Default for project Tutorial1 ****
"C:\\android-ndk-r9d-windows-x86_64\\android-ndk-r9d\\ndk-build.cmd" NDK_DEBUG=1 all 
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
[armeabi] Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
GStreamer      : [GEN] => gst-build/gstreamer_android.c
GStreamer      : [COMPILE] => gst-build/gstreamer_android.c
gst-build/gstreamer_android.c:2:21: fatal error: gst/gst.h: No such file or directory
compilation terminated.
make.exe: *** [gst-build/gstreamer_android.o] Error 1

I am using ndk-9d and eclipse luna on windows 8.1.

I installed the needed software on the suggestion(http://docs.gstreamer.com/display/GstSDK/Installing+for+Android+development)

I tried pointing pkg_config_path to the folder where gstreamer-0.10 library is located. but doesn't solve out.

I tried to import the same project on android studio 1.0.2. I've got the same errors too.

I have no idea how to figure the issues. I tried ndk-10d(the newest version) but doesn't work.

This is my Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := tutorial-1
LOCAL_SRC_FILES := tutorial-1.c
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)

ifndef GSTREAMER_SDK_ROOT
ifndef GSTREAMER_SDK_ROOT_ANDROID
$(error GSTREAMER_SDK_ROOT_ANDROID is not defined!)
endif
GSTREAMER_SDK_ROOT        := $(GSTREAMER_SDK_ROOT_ANDROID)
endif
GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/
GSTREAMER_PLUGINS         := coreelements
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer.mk

1个回答

    最佳答案
  1. I found the reason why eclipse could not refer to gstreamer package. The gstreamer folder included non-english language. Eclipse didn't read the path correctly.

    You'd better check out the source file, "org.eclipse.cdt.core.prefs" in .setting. Then, look at the path if it is correct.