不能在钛模块中使用静态库

时间:2011-10-13 12:54:16

标签: objective-c titanium titanium-mobile

我正在尝试将静态库添加到我创建的钛iphone模块中,似乎无论何时我将库添加到“使用库链接二进制文件”,并使用titanium run钛返回以下错误:

[ERROR] Error: Traceback (most recent call last):
[DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1148, in main
[DEBUG] execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s" % (log_id,sdk_version,debugstr)],False)
[DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1066, in execute_xcode
[DEBUG] output = run.run(args,False,False,o)
[DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/run.py", line 39, in run
[DEBUG] sys.exit(rc)
[DEBUG] SystemExit: 65
[ERROR] Build Failed. See: /var/folders/ot/ot5FPlA3EZyk6n8ZnYeWxk+++TI/-Tmp-/m9mX89ati/test2/build/iphone/build/build.log

build.log显示:

** BUILD FAILED **


The following build commands failed:
    Ld build/Debug-iphonesimulator/test2.app/test2 normal i386
(1 failure)
EXIT CODE WAS: 65

Exception detected in script:
Traceback (most recent call last):
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1148, in main
    execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s" % (log_id,sdk_version,debugstr)],False)
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1066, in execute_xcode
    output = run.run(args,False,False,o)
  File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/run.py", line 39, in run
    sys.exit(rc)
SystemExit: 65

我很绝望,有人帮忙吗?

谢谢!

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

将此行添加到module.xcconfig

OTHER_LDFLAGS=$(inherited) -framework GameKit

其中GameKit是您库中使用的缺失框架。