Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17117

Missing header files compiling for Android

$
0
0

@Lem wrote:

Hello!

I try to compile my game for android devices and I get errors like this:

fatal error: IGame.h: No such file or directory
 #include "IGame.h"

which is absurd because all the header files are there :/

I don't know what could be the problem. My Android.mk file looks like this:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)


LOCAL_MODULE := cocos2dcpp_shared

LOCAL_MODULE_FILENAME := libcocos2dcpp

LOCAL_SRC_FILES := hellocpp/main.cpp \
                  ../../Classes/AppDelegate.cpp \
                  ../../Classes/BasicClasses/GameSettings.cpp \
                  ../../Classes/Interfaces/IGetReady.cpp \
                  ../../Classes/Interfaces/IScene.cpp \
                  ../../Classes/Nodes/ImageSprite.cpp \
                  ../../Classes/Nodes/PlateSprite.cpp \
                  ../../Classes/Scenes/ColorGameScene.cpp \
                  ../../Classes/Scenes/GetReadyLayer.cpp \
                  ../../Classes/SoundManagers/SoundManager.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

# _COCOS_HEADER_ANDROID_BEGIN
# _COCOS_HEADER_ANDROID_END


LOCAL_STATIC_LIBRARIES := cocos2dx_static

# _COCOS_LIB_ANDROID_BEGIN
# _COCOS_LIB_ANDROID_END

include $(BUILD_SHARED_LIBRARY)

$(call import-module,./prebuilt-mk)

# _COCOS_LIB_IMPORT_ANDROID_BEGIN
# _COCOS_LIB_IMPORT_ANDROID_END

Is it because I don't have the files in the Classes folder but inside some subfolders in Classes?

Also the IGame.h is a .h standalone file. What about those?

EDIT:

Found the solution! Had to add this to my .mk file:

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../Classes/BasicClasses
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../Classes/Interfaces
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../Classes/Nodes
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../Classes/Scenes
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../Classes/SoundManagers

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>