首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为iOS构建OpenSceneGraph 3.0.1

为iOS构建OpenSceneGraph 3.0.1
EN

Stack Overflow用户
提问于 2011-08-04 05:15:08
回答 1查看 2K关注 0票数 3

我正在尝试按照自述文件中指定的方式为iOS构建OpenSceneGraph。

代码语言:javascript
复制
cmake -G Xcode \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_CXX_FLAGS:STRING="-ftree-vectorize -fvisibility-inlines-hidden -mno-thumb -arch armv6 -pipe -no-cpp-precomp -miphoneos-version-min=3.2 -mno-thumb" \
-D BUILD_OSG_APPLICATIONS:BOOL=OFF \
-D OSG_BUILD_FRAMEWORKS:BOOL=OFF \
-D OSG_WINDOWING_SYSTEM:STRING=IOS \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_OSX_ARCHITECTURES:STRING="armv6;armv7" \
-D CMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
-D OSG_GL1_AVAILABLE:BOOL=OFF \
-D OSG_GL2_AVAILABLE:BOOL=OFF \
-D OSG_GLES1_AVAILABLE:BOOL=ON \
-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-D OSG_GL_LIBRARY_STATIC:BOOL=OFF \
-D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-D DYNAMIC_OPENTHREADS:BOOL=OFF .

但是我得到了下面的错误。

代码语言:javascript
复制
-- The C compiler identification is GNU
-- The CXX compiler identification is unknown
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- broken
CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /Volumes/MY_DATA/AugmentedReality/osg/OpenSceneGraph-3.0.1/CMakeFiles/CMakeTmp

  Run Build Command:/opt/local/bin/cmakexbuild -project
  CMAKE_TRY_COMPILE.xcodeproj build -target cmTryCompileExec -configuration
  Debug

  === BUILD NATIVE TARGET cmTryCompileExec OF PROJECT CMAKE_TRY_COMPILE WITH
  CONFIGURATION Debug ===

  Check dependencies

  target specifies product type 'com.apple.product-type.tool', but there's no
  such product type for the 'iphoneos' platform

  ** BUILD FAILED **

  The following build commands failed:

    Check dependencies

  (1 failure)

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:30 (PROJECT)

-- Configuring incomplete, errors occurred!

什么可能会导致这个问题,我该如何解决?

EN

回答 1

Stack Overflow用户

发布于 2011-10-15 04:00:29

我正在尝试做同样的事情,并得到一个类似的错误。我发现以下帖子指出,在为iOS构建时,cmake还不兼容Xcode4:

http://forum.openscenegraph.org/viewtopic.php?t=9034

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6933379

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档