错误致命错误:CCApplication.h:没有这样的文件或目录

时间:2013-05-26 14:16:51

标签: include cocos2d-x inclusion

我正在尝试在Windows 7 64位

中创建一个新的cocos2dx项目

cocos2dx版本:cocos2d-2.1rc0-x-2.1.3

ADT捆绑:adt-bundle-windows-x86_64-20130514

NDK:android-ndk-r8e-windows-x86_64

路径变量:

    NDK_ROOT=c:\android\NDK;

    Path: .....other windows stuffs;c:\..java";c:\cygwin\bin;

当我执行create-android-project.bat时,不会显示错误。项目创建得很好。

但是当我将它导入eclipse时,它在AppDelegate.h文件中显示错误。

我在properties->路径和符号中包括以下条目 - >包括

C:\ android \ NDK \ platforms \ android-9 \ arch-arm \ usr \ include和

C:\机器人\ cocos2dx \ cocos2dx \包括  我还在源选项卡中链接了我的项目的类文件夹。但是当我尝试将应用程序作为android项目运行时,代码会编译并显示以下内容

**** Build of configuration Default for project moleitx ****

bash ./build_native.sh NDK_DEBUG=1 V=1 all 
cygwin warning:
MS-DOS style path detected: C:\android\cocos2dx\moleitx\proj.android
Preferred POSIX equivalent is: /cygdrive/c/android/cocos2dx/moleitx/proj.android
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
NDK_ROOT = c:\android\NDK
COCOS2DX_ROOT = C:\android/cocos2dx/moleitx/proj.android/../.. 
APP_ROOT = C:\android/cocos2dx/moleitx/proj.android/..
APP_ANDROID_ROOT = C:\android/cocos2dx/moleitx/proj.android
Using prebuilt externals
make: Entering directory `/cygdrive/c/android/cocos2dx/moleitx/proj.android'
/cygdrive/c/android/NDK/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-9 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml    
Android NDK: WARNING: Ignoring unknown import directory: C    
Android NDK: WARNING: Ignoring unknown import directory: C    
rm -f ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/mips/lib*.so ./libs/x86/lib*.so
rm -f ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/mips/gdbserver ./libs/x86/gdbserver
rm -f ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/mips/gdb.setup ./libs/x86/gdb.setup
Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
install -p /cygdrive/c/android/NDK/prebuilt/android-arm/gdbserver/gdbserver ./libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
echo "set solib-search-path ./obj/local/armeabi" > ./libs/armeabi/gdb.setup
echo "directory C:/android/NDK/platforms/android-9/arch-arm/usr/include \android/cocos2dx/moleitx/proj.android/../../external/Box2D/.. C:/android/NDK/sources/cxx-stl/gnu-libstdc++/4.6/include C:/android/NDK/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include \android/cocos2dx/moleitx/proj.android/../../external/chipmunk/include/chipmunk \android/cocos2dx/moleitx/proj.android/../../cocos2dx \android/cocos2dx/moleitx/proj.android/../../cocos2dx/include \android/cocos2dx/moleitx/proj.android/../../cocos2dx/kazmath/include \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/android \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libpng/include \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libjpeg/include \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libtiff/include \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libwebp/include C:/android/NDK/sources/android/cpufeatures \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libcurl \android/cocos2dx/moleitx/proj.android/../../CocosDenshion/android/../include \android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libcurl/include \android/cocos2dx/moleitx/proj.android/../../extensions \android/cocos2dx/moleitx/proj.android/../../CocosDenshion/android/../../cocos2dx \android/cocos2dx/moleitx/proj.android/../../CocosDenshion/android/../../cocos2dx/include \android/cocos2dx/moleitx/proj.android/../../CocosDenshion/android/../../cocos2dx/kazmath/include \android/cocos2dx/moleitx/proj.android/../../CocosDenshion/android/../../cocos2dx/platform/android jni/../../Classes \android/cocos2dx/moleitx/proj.android/../../extensions/CCBReader \android/cocos2dx/moleitx/proj.android/../../extensions/GUI/CCControlExtension \android/cocos2dx/moleitx/proj.android/../../extensions/GUI/CCScrollView \android/cocos2dx/moleitx/proj.android/../../extensions/network \android/cocos2dx/moleitx/proj.android/../../extensions/LocalStorage" >> ./libs/armeabi/gdb.setup
Compile++ thumb  : game_shared <= main.cpp
Cygdrive/c/android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o.d.org -fpic  -ffunction-sections  -funwind-tables  -fstack-protector  -no-canonical-prefixes -march=armv5te  -mtune=xscale  -msoft-float -fno-exceptions -fno-rtti  -mthumb  -Os  -g  -DNDEBUG  -fomit-frame-pointer  -fno-strict-aliasing  -finline-limit=64  -O0  -UNDEBUG  -marm  -fno-omit-frame-pointer  -Ijni/../../Classes -IC:/android/NDK/sources/cxx-stl/gnu-libstdc++/4.6/include -IC:/android/NDK/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/kazmath/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/android -I\android/cocos2dx/moleitx/proj.android/../../CocosDenshion/android/../include -I\android/cocos2dx/moleitx/proj.android/../../extensions -I\android/cocos2dx/moleitx/proj.android/../../extensions/CCBReader -I\android/cocos2dx/moleitx/proj.android/../../extensions/GUI/CCControlExtension -I\android/cocos2dx/moleitx/proj.android/../../extensions/GUI/CCScrollView -I\android/cocos2dx/moleitx/proj.android/../../extensions/network -I\android/cocos2dx/moleitx/proj.android/../../extensions/LocalStorage -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libpng/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libjpeg/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libtiff/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libwebp/include -I\android/cocos2dx/moleitx/proj.android/../../cocos2dx/platform/third_party/android/prebuilt/libcurl/include -I\android/cocos2dx/moleitx/proj.android/../../external/Box2D/.. -I\android/cocos2dx/moleitx/proj.android/../../external/chipmunk/include/chipmunk -IC:/android/NDK/sources/android/cpufeatures -Ijni  -DANDROID -Wno-psabi -DUSE_FILE32API -Wno-psabi -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -Wa,--noexecstack        -frtti -DCOCOS2D_DEBUG=1    -IC:/android/NDK/platforms/android-9/arch-arm/usr/include  -c   jni/hellocpp/main.cpp -o ./obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o  && ./obj/convert-dependencies.sh ./obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o.d
In file included from jni/hellocpp/main.cpp:1:0:
jni/../../Classes/AppDelegate.h:4:27: fatal error: CCApplication.h: No such file or directory
compilation terminated.
/cygdrive/c/android/NDK/build/core/build-binary.mk:272: recipe for target `obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o' failed
make: Leaving directory `/cygdrive/c/android/cocos2dx/moleitx/proj.android'
make: *** [obj/local/armeabi/objs-debug/game_shared/hellocpp/main.o] Error 1

**** Build Finished ****

错误显示在AppDelegate.h中

#include "CCApplication.h" 

并显示错误

- fatal error: CCApplication.h: No such file or directory
- Unresolved inclusion: "CCApplication.h"

此外,几乎所有包含.h扩展名的内容都有“未解决”错误。即,cocos2d.h,SimpleAudioEngine.h等

如果尝试过包括像cocos2dx \ platform \ android等文件夹..但没有工作.. 有些人请弄清楚问题是什么..

0 个答案:

没有答案