I'm developing a cocos2d-x project, as its universal it works on android and iOS.
I recently added text to speech functionality using flite. In xcode all I do to use flite, is drag in the folder of the headers and c files into my xcode project, and then I can include its headers and use it. No problems there.
However in eclipse I can't get the compiler to see the files, and it keeps bombing out with the fatal error I mentioned. Specifically: fatal error: flite.h no such file or directory.
I've tried to include the folder in the includes section of eclipse under C/C++ general but no luck. I think this may have something to do with my android.mk file, guidance on how to set this up for this purpose would be greatly appreciated. On a side note, my project is set up so that my .cpp and .h files exist elsewhere on my computer and not in my actual project. Likewise for my flite source files. (I did try add them to my project however, out of desperation but the compiler still couldn't find them)
Thanks for your time.
PS: How does one refer to flite, is it a library/framework etc?
Edit I tried to modify my Android.mk file, to locate the flite headers. My additions are indicated below
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game_shared
LOCAL_MODULE_FILENAME := libgame
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp \
../../Classes/CCLabelTTFExtension.cpp \
../../Classes/menuScene.cpp \
../../Classes/text_Parse.cpp \
../../Classes/FileTS.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes/
#my addition
LOCAL_C_INCLUDES += $(LOCAL_PATH)/flite/
dirs := $(shell /flite -type d)
cfilestemp1 := $(shell find /src -type d)
cfilestemp2 := $(shell find $(cfilestemp1) -name *.c)
cfilestemp3 := $(sort $(cfilestemp2))
cfiles := $(subst $(LOCAL_PATH)/,,$(cfilestemp3))
LOCAL_SRC_FILES += \
$(cfiles)
#end my addition
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,CocosDenshion/android) \
$(call import-module,cocos2dx) \
$(call import-module,extensions)
include $(CLEAR_VARS)
This got me closer, well, gave me different errors. Now the compiler complains of undefined references in my FileTS.cpp file, the file which is using flite in my project. (Note: My flite headers and source files are now added to my project in the jni folder)