在Twitter + Oauth库的情况下,链接器命令失败错误

时间:2014-12-09 08:00:57

标签: objective-c xcode twitter

  i am integrating twitter iOS app with my iOS app just for login purpose and for that i am using SCTwitter and Twitter+OAuth frameworks. but the problem is that when i  build my project it gave me a compiler error like below:-

    **ld: warning: directory not found for option '-L/Users/harvinder/Desktop/iphone_app 13/Twitter+OAuth/Libraries'
    ld: warning: directory not found for option '-L&'
    ld: warning: directory not found for option '-LHeaders'
    ld: library not found for -lOAuth
    clang: error: linker command failed with exit code 1 (use -v to see invocation)**

上面的错误清楚地表明没有找到Twitter + OAuth库,但是我已经重新检查了我的项目并且它已被添加并且我已经尝试了许多类似的东西  1.图书馆搜索路径($(PROJECT_DIR)/ Twitter + OAuth / Libraries& Headers)  2.还要在​​libxml2.dylib和libOAuth.a的构建阶段检查链接二进制文件和库

    At last i delete the Twitter+OAuth folder and readded it and then everything works fine but the wired thing is that on the next day when i reopen my project in Xcode ,the same error encounter again  and again i delete and readded the Twitter+OAuth folder and everything works fine again and same thing happens on the next day too. so i don't understand this weird behavior. 
    so please help me on this because everyday i have to delete and readd the folder to run my project. 

1 个答案:

答案 0 :(得分:0)

空格用于分隔命令行选项,而包含库的目录包含空格,因此您需要确保命令行解释程序不会看到这些空格。这通常使用引号完成,因此请在库搜索路径中尝试此值:

'$(PROJECT_DIR)/Twitter+OAuth/Libraries & Headers'
^                                                ^

或者避免在目录名中使用空格。