如何建立ASSIMP库的iOS(设备和仿真器)与升压库? [英] How to build ASSIMP Library for iOS (Device and Simulator) with boost-library?

查看:698
本文介绍了如何建立ASSIMP库的iOS(设备和仿真器)与升压库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用的ASSIMP库 http://assimp.sourceforge.net 在iOS的项目。不幸的是,我不是很有经验的makefile和这些东西,所以我需要一些帮助。

I want to use the ASSIMP library http://assimp.sourceforge.net in an iOS project. Unfortunately, I'm not very experienced with makefiles and that stuff, so I need some help.

我已经下载了源和第一我试图使用make(在code-子)
在makefile我已经添加了 INCLUDEFLAGS = -I /库,因为我的提振报头文件在/ lib /升压
执行使静态成功与一些警告。静态库(.a)中产生的。

I've downloaded the sources and first I tried to build with make (in the code-subfolder) In the makefile I've added INCLUDEFLAGS = -I/Lib because my boost header-files are in /Lib/boost Executing make static succeeds with some warnings. A static library (.a) is generated.

然后我试图给。一个文件添加到我的X code项目和指定的assimp头文件夹作为附加包含目录(其他的搜索路径)。连接失败,该库一直没有合适的架构(I386为模拟器需要)消息

Then I tried to add the .a-file to my xcode-project and specified the assimp-header folder as additional include directory (Other Search Paths). Linking failed with the message that the library has not the right architecture (i386 required for the simulator)

文件libassimp.a 输出:libassimp.a:当前AR档案库随机

file libassimp.a outputs: "libassimp.a: current ar archive random library"

我怎样才能建立在i386 architcture和ARM6或ARM7图书馆,无论我需要在iOS设备上?

How can I build the library for the i386 architcture and for arm6 or arm7, whatever I need on an iOS device?

它是确定只使用升压头还是更/必要建立提升为库?目前,我只使用升压头,这应该是罚款,因为提升是一个标题只有图书馆?!

Is it ok to use the boost-headers only or is it better/necessary to build boost as a library? Currently I'm using boost headers only, which should be fine since boost is a header only library?!

还有一个cmake的 - 生成文件(的CMakeLists.txt)。 cmake的是建设图书馆推荐的方式,但我没有与任何的CMake经验。

There is also a cmake - makefile (CMakeLists.txt). cmake is the recommended way of building the library but I don't have any experience with cmake.

或者另一个想法:是否有可能建立利用x code库?
最终的结果应该是i386的,ARM6和ARM7架构库。

Or another thought: Is it possible to build a library via xcode? The final result should be a library for i386, arm6 and arm7 architecture.

我该怎么办?怎么样?

编辑:

我刚刚发现有文件 aiDefines.h 在以下preprocessor检查:

I've just discovered that there are the following preprocessor checks in the file aiDefines.h:

#if defined(_MSC_VER)
    // See http://msdn.microsoft.com/en-us/library/b0084kay.
#   if defined(_M_IX86)
#       define ASSIMP_BUILD_X86_32BIT_ARCHITECTURE
#   elif defined(_M_X64)
#       define ASSIMP_BUILD_X86_64BIT_ARCHITECTURE
#   elif defined(_M_IA64)
#       define ASSIMP_BUILD_IA_64BIT_ARCHITECTURE
#   else
#       error unknown architecture
#   endif
#elif defined(__GNUC__)
    // See http://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html.
#   if defined(__x86_32__) || defined(__i386__)
#       define ASSIMP_BUILD_X86_32BIT_ARCHITECTURE
#   elif defined(__x86_64__)
#       define ASSIMP_BUILD_X86_64BIT_ARCHITECTURE
#   elif defined(__ppc__)
#       define ASSIMP_BUILD_PPC_32BIT_ARCHITECTURE
#   else
#       error unknown architecture
#   endif
#else
#   error unknown compiler
#endif

这是否意味着,这是不可能的编译ASSIMP库ARM架构?

Does this mean, it is not possible to compile the ASSIMP library for ARM architecture?

推荐答案

我个人没有做任何iOS开发,但我知道,其他人已经成功编译Assimp为用X code他们的iDevices。一个X code 3项目应该被包含在发行,虽然我不知道你是否可以使用它没有进一步的修改。

I personally don't do any iOS development, but I know that others have successfully compiled Assimp for their iDevices using Xcode. An Xcode 3 project should be included with the distribution, although I don't know if you can use it without further modification.

该架构preprocessor定义,目前只用于日志输出(在 code / Importer.cpp ),以及ARM的支持已经被添加到后备箱在此期间(r919,是精确的)。

The architecture preprocessor defines are currently only used for logging output (in code/Importer.cpp), and support for ARM has been added to trunk in the meantime (r919, to be exact).

这篇关于如何建立ASSIMP库的iOS(设备和仿真器)与升压库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆