简体   繁体   中英

Apple Mach-O Linker Warning: how to get rid of it but not affect my friend

So, I get the following warning when compiling my app:

ld: warning: directory not found for option '-F/Users/my peer's usernamr/Desktop/desktopFolder/my app's name/GoogleCastFramework-2.0-Release'

I know the reason it is giving me the warning: my friend and I are working on two different computers, so for the app to compile, we need different search paths for the GoogleCastFramework. I know I can get rid of the warning by deleting the framework search path, but that means my peer has to add the search path again when he works on the project. But it's annoying to see it all the time if I don't get rid of it. Is there anyway I can delete the search path while not affecting my peer? Can I get rid of it by somehow relocating the framework folder?

If you're both using the framework, you should put it in a folder relative to the Xcode project. For example:

project/
    yourProject.xcodeproj
    yourSource.c
    Frameworks/
        GoogleCast.framework

Then add it to the project using a project-relative path rather than an absolute path. You can set it to a relative path by selecting the framework in the project navigator, opening the "Utilities" tab, and changing the "Location" pop-up to "Relative To Project".

如果在项目设置中使用绝对用户名而不是绝对库路径编辑库路径,则无论用户如何,都将获得正确的路径。

Follow this steps:

  • Go to Targets - Build Phases - Link Binary with Libraries
  • Click on + & add the GoogleCastFramework

Hope this will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM