简体   繁体   English

Xcode ld:找不到 -LFSCalendar 的库

[英]Xcode ld: library not found for -LFSCalendar

I have an existing Xcode iOS project that uses FSCalendar library.我有一个使用FSCalendar库的现有 Xcode iOS 项目。 I have now opened this project on another mac computer with Xcode installed.我现在已经在另一台安装了 Xcode 的 Mac 计算机上打开了这个项目。

When I build my project, I get the following error:当我构建我的项目时,我收到以下错误:

ld: library not found for -LFSCalendar

In the Project --> Build Settings --> Search Paths I see:在 Project --> Build Settings --> Search Paths 我看到:

Library Search Paths:图书馆搜索路径:

"build/Debug-iphoneos/FSCalendar"
"build/Release-iphoneos/FSCalendar"

Question 1 What do I have to do to get this to build?问题 1我必须做什么才能构建它? Do I have to copy the FSCalendar folder to the Debug and Release locations above etc?我是否必须将 FSCalendar 文件夹复制到上面的调试和发布位置等?

Question 2 Should there be an actual library file somewhere called FSCalendar in my project directory?问题 2在我的项目目录中是否应该有一个名为 FSCalendar 的实际库文件? there is a folder called FSCalendar which contains all the FSCalendar source code files.有一个名为 FSCalendar 的文件夹,其中包含所有 FSCalendar 源代码文件。 Do these files get built into a library output file??这些文件是否内置到库输出文件中?

If you're talking about this FSCalendar - it will depend on how you've integrated with your project.如果您在谈论这个FSCalendar - 这将取决于您如何与您的项目集成。 The projects readme describes methods using Carthage , CocoaPods and manual integration.项目自述文件描述了使用CarthageCocoaPods和手动集成的方法。

Carthage迦太基

From the doc's文档的

Running a project that uses Carthage运行一个使用 Carthage 的项目

After you've finished the above steps and pushed your changes, other users of the project only need to fetch the repository and run carthage bootstrap to get started with the frameworks you've added.完成上述步骤并推送更改后,项目的其他用户只需获取存储库并运行carthage bootstrap即可开始使用您添加的框架。

CocoaPods可可豆

In your projects root directory where your Podfile exists, it Terminal.app you should be able to run:在您的Podfile所在的项目根目录中,您应该可以运行Terminal.app

$ pod install

Manual Integration手动积分

If you've used the manual options then you probably already have a target for check the Build Phases tab of your projects main target.如果您使用了手动选项,那么您可能已经有一个目标可以检查项目主要目标的Build Phases选项卡。 Then check the list of files under the head Compile Sources (you may need to click on the disclosure triangle to unfold the list).然后检查编译源头下的文件列表(您可能需要单击显示三角形来展开列表)。

I believe you manually added FSCalendar in project,我相信你在项目中手动添加了FSCalendar

Solution 1:

While adding to project you forget to tick Copy item if needed .添加到项目时,您忘记勾选Copy item if needed Please add FSCaldendar folder again and tick Copy item if needed.如果需要,请再次添加 FSCaldendar 文件夹并勾选复制项目。

In case you added with cocoa pods, then try solution 2.

Solution 2:

If you added with cocoa pods, Please go to terminal -> go to project directory -> and run command -> pod install如果你添加了可可豆荚,请到go to terminal -> go to project directory -> and run command -> pod install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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