Wednesday, February 26, 2014

cocos2d-x comes with sample problems with cygwin compiler unsuccessful


First posted tips from cygwin's

 Wo @ Aaron / j/cocos2d-2.1rc0-x-2.1.2-hotfix/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/Sim pleGame / proj.android 
$. / Build_native.sh
NDK_ROOT = / cydrive/d/android-ndk-r4b
COCOS2DX_ROOT = / cydrive/j/cocos2d-2.1rc0-x-2.1.2-hotfix/cocos2d-2.1rc0-x-2.1.2
APP_ROOT = / j/cocos2d-2.1rc0-x-2.1.2-hotfix/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/S impleGame / proj.android / ..
APP_ANDROID_ROOT = / j/cocos2d-2.1rc0-x-2.1.2-hotfix/cocos2d-2.1rc0-x-2.1.2/sampl es / Cpp / SimpleGame / proj.android
Using prebuilt externals
. / Build_native.sh: line 104: / cydrive/d/android-ndk-r4b/ndk-build: No such file or directory


$. / Build_native.sh sentence is a command
Here is the process and error!

Why is there / build_native.sh:. Line 104: / cydrive/d/android-ndk-r4b/ndk-build: No such file or directory This error how to solve
!!!<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Attach file code
build_native.shAPPNAME = "SimpleGame"

# Options
NDK_ROOT = / cydrive/d/android-ndk-r4b

buildexternalsfromsource =

usage () {
cat << EOF
usage: $ 0 [options]

Build C / C + + code for $ APPNAME using Android NDK

OPTIONS:
-S Build externals from source
-H this help
EOF
}

while getopts "sh" OPTION; do
case "$ OPTION" in
s)
buildexternalsfromsource = 1
;;
h)
usage
exit 0
;;
esac
done

# Read local.properties

_LOCALPROPERTIES_FILE = $ (Dirname "$ 0") "/ local.properties"
if [-f "$ _LOCALPROPERTIES_FILE"]
then
[-R "$ _LOCALPROPERTIES_FILE"] | | die "Fatal Error: $ _LOCALPROPERTIES_FILE exists but is unreadable"

# Strip out entries with a "." Because Bash cannot process variables with a "."
_PROPERTIES = `Sed '/ \. / D'" $ _LOCALPROPERTIES_FILE "`
for line in "$ _PROPERTIES"; do
declare "$ line";
done
fi

# Paths

if [-z "$ {NDK_ROOT + aaa}"]; then
echo "NDK_ROOT not defined. Please define NDK_ROOT in your environment or in local.properties"
exit 1
fi

DIR = "$ (cd" $ (dirname "$ {BASH_SOURCE [0]}") "&& pwd)"
# ... Use paths relative to current directory
COCOS2DX_ROOT = / cydrive/j/cocos2d-2.1rc0-x-2.1.2-hotfix/cocos2d-2.1rc0-x-2.1.2
APP_ROOT = "$ DIR / .."
APP_ANDROID_ROOT = "$ DIR"

echo "NDK_ROOT = $ NDK_ROOT"
echo "COCOS2DX_ROOT = $ COCOS2DX_ROOT"
echo "APP_ROOT = $ APP_ROOT"
echo "APP_ANDROID_ROOT = $ APP_ANDROID_ROOT"

# Make sure assets is exist
if [-d "$ APP_ANDROID_ROOT" / assets]; then
rm-rf "$ APP_ANDROID_ROOT" / assets
fi

mkdir "$ APP_ANDROID_ROOT" / assets

# Copy resources
for file in "$ APP_ROOT" / Resources / *
do
if [-d "$ file"]; then
cp-rf "$ file" "$ APP_ANDROID_ROOT" / assets
fi

if [-f "$ file"]; then
cp "$ file" "$ APP_ANDROID_ROOT" / assets
fi
done

# Copy icons (if they exist)
file = "$ APP_ANDROID_ROOT" / assets/Icon-72.png
if [-f "$ file"]; then
cp "$ file" "$ APP_ANDROID_ROOT" / res / drawable-hdpi / icon.png
fi
file = "$ APP_ANDROID_ROOT" / assets/Icon-48.png
if [-f "$ file"]; then
cp "$ file" "$ APP_ANDROID_ROOT" / res / drawable-mdpi / icon.png
fi
file = "$ APP_ANDROID_ROOT" / assets/Icon-32.png
if [-f "$ file"]; then
cp "$ file" "$ APP_ANDROID_ROOT" / res / drawable-ldpi / icon.png
fi


if [["$ buildexternalsfromsource"]]; then
echo "Building external dependencies from source"
"$ NDK_ROOT" / ndk-build-C "$ APP_ANDROID_ROOT" $ * \
"NDK_MODULE_PATH = $ {COCOS2DX_ROOT}: $ {COCOS2DX_ROOT} / cocos2dx/platform/third_party/android/source"
else
echo "Using prebuilt externals"
"$ NDK_ROOT" / ndk-build-C "$ APP_ANDROID_ROOT" $ * \
"NDK_MODULE_PATH = $ {COCOS2DX_ROOT}: $ {COCOS2DX_ROOT} / cocos2dx/platform/third_party/android/prebuilt"
fi

Reply:
I also encountered the same problem, I do not know how the landlord is resolved
Reply:
You're there to suggest that I have not run even suggest where to start with this the way

No comments:

Post a Comment