首页 新闻 搜索 专区 学院

在windows下编译Android平台的OpenSceneGraph报错,请问什么原因?

0
悬赏园豆:30 [已关闭问题] 关闭于 2019-04-09 14:31

看下面的命令行参数及报错信息,cmake已经指明了编译andoird平台下的,也制定到ndk的路径,但是就报错信息来看,还是提示找不到ndk,并且还调用的msbuild简直奇怪?难道不应该使用ndk下面的编译器来编译嘛?

 

一下命令是在cygwin64中执行的。

 

$ cmake . -DANDROID_NDK=/cygdrive/E/DevelopmentKits/android-ndk-r16b -DCMAKE_TOOLCHAIN_FILE=./PlatformSpecifics/Android
/android.toolchain.cmake -DOPENGL_PROFILE="GLES2" -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATI
VE_API_LEVEL=15 -DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=/cygdrive/E/DevelopmentKits/osg3.4.1
CMake Deprecation Warning at CMakeLists.txt:36 (cmake_policy):
The OLD behavior for policy CMP0008 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:43 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Error at PlatformSpecifics/Android/android.toolchain.cmake:493 (message):
Could not find neither Android NDK nor Android standalone toolchain.

You should either set an environment variable:
export ANDROID_NDK=~/my-android-ndk
or
export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
or put the toolchain or NDK in the default path:
sudo ln -s ~/my-android-ndk C:/Program Files/android-ndk
sudo ln -s ~/my-android-toolchain /opt/android-toolchain
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (include)
CMakeLists.txt:52 (PROJECT)


CMake Error at CMakeLists.txt:52 (PROJECT):
Failed to run MSBuild command:

C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

to get the value of VCTargetsPath:

Microsoft (R) 生成引擎版本 14.0.25420.1
版权所有(C) Microsoft Corporation。保留所有权利。

生成启动时间为 2018/8/24 9:03:06。
节点 1 上的项目“E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj”(默认目标)。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : Android SDK location is not specified. [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : Set either the global option (Tools -> Options -> Nsight Tegra -> Android SDK Location) or the project property "Android SDK Location". [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : The Android SDK can be downloaded at this URL: [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : http://developer.android.com/sdk/index.html [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
已完成生成项目“E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。

生成失败。

“E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj”(默认目标) (1) ->
(CheckNdkAndSdk 目标) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : Android SDK location is not specified. [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : Set either the global option (Tools -> Options -> Nsight Tegra -> Android SDK Location) or the project property "Android SDK Location". [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : The Android SDK can be downloaded at this URL: [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(10,5): error : http://developer.android.com/sdk/index.html [E:\DevelopmentKits\OpenSceneGraph-OpenSceneGraph-3.4.1\CMakeFiles\3.11.0\VCTargetsPath.vcxproj]

0 个警告
1 个错误

已用时间 00:00:00.13


Exit code: 1

 

-- Configuring incomplete, errors occurred!

tgis的主页 tgis | 菜鸟二级 | 园豆:202
提问于:2018-08-24 09:08
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册