我正在尝试绑定到BugSense的lib,但是很难在额外的构建参数中包含使用-gcc_flags
的框架。BugSense提供了一个.framework,而不是一个静态.a库。再多的谷歌搜索也不能让我找到一个解决方案,如何正确地将框架链接到我的项目中。
到目前为止,我有这样的东西:
-v -v -v -gcc_flags "-framework ${ProjectDir}/../References/BugSense-iOS.framework"
我已经将.framework文件夹复制到我的References文件夹中。
构建项目会导致以下mtouch错误:
Error 1: mtouch failed with the following message:
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m: In function 'main':
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:1838: warning: implicit declaration of function 'monotouch_enable_debug_tracking'
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:1921: warning: implicit declaration of function 'mini_get_debug_options'
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:1925: warning: implicit declaration of function 'mono_debugger_agent_parse_options'
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:2059: warning: cast from pointer to integer of different size
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:2059: warning: initialization makes pointer from integer without a cast
ld: framework not found /Users/xxx/Projects/myProj/myProj/../References/BugSense-iOS.framework
collect2: ld returned 1 exit status
发布于 2011-07-06 13:45:27
我认为它类似于库:您指定框架的名称,然后指定要搜索的位置。
-F <dir>
-framework <name>
所以试试这个:
-gcc_flags "-F ${ProjectDir}/../References -framework BugSense-IOS"
https://stackoverflow.com/questions/6514128
复制相似问题