在 Xcode 项目中,我收到此链接器命令错误,退出代码为 1
in Xcode project I get this linker command error with exit code 1
我正在关注这个 example 关于 Swift + SignalR。这是所有安装步骤:
我使用了另一个帮助我生成此 pod 文件的教程:
\# Uncomment this line to define a global platform for your project platform :ios, '9.0'
target 'SwiftR iOS' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for SwiftR iOS
target 'SwiftR iOSTests' do
inherit! :search_paths
# Pods for testing end
end
target 'SwiftR iOS Demo' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks # use_frameworks!
# Pods for SwiftR iOS Demo
end
target 'SwiftR Mac' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for SwiftR Mac
target 'SwiftR MacTests' do
inherit! :search_paths
# Pods for testing end
end
target 'SwiftR Mac Demo' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for SwiftR Mac Demo
end
我的 Xcode 项目已关闭,我尝试在终端中安装它:
pod 安装
它运行并说:
Pod installation complete! There are 0 dependencies from the Podfile
and 0 total pods installed.
我可以验证所有框架都没有安装:
我仍然去了 Xcode 项目,将其部署目标设置为 9.0 并尝试构建仍然,这是我得到的错误
我已经尝试清理并重新启动并删除 Xcode 派生数据
您的播客文件不包含任何 pods.
在 target TargetName do
和 end
行之间,您必须插入 pod SwiftR
以便 pod install
安装 SwiftR pod 并将其附加到该目标。取决于您实际使用的目标的名称。您可以在 Xcode.
的项目设置中查看您的目标
编辑(反映评论)
第一次 运行 pod install
(假设有 pods 要安装)它会创建一个单独的项目文件,扩展名为 .xcworkspace。如果你打开了 xcodeproj,你必须退出它,然后只使用 xcworkspace。它将 pods 和您的主要项目文件打包在一个工作区中,以便文件正确编译等。
该教程的所有者回答了我的问题:
如果您将此示例用于任何用途,我希望您了解最新的 .NET Core、DNX/DNU、donet cli 等。如果您不知道最近的 .NET 更改,请注意,.NET Core 堆栈最近变化非常快,尚未达到 1.0 版。 SignalRDemo 存储库是更熟悉的 ASP.NET 4.5 堆栈的更好起点。
不过,您的描述听起来像是在尝试使用 SwiftR。在那种情况下,只需克隆 SwiftR 存储库,打开 SwiftR.xcodeproj,将目标更改为 iOS 演示应用程序,项目将 build/run in Xcode 7.
我正在关注这个 example 关于 Swift + SignalR。这是所有安装步骤:
我使用了另一个帮助我生成此 pod 文件的教程:
\# Uncomment this line to define a global platform for your project platform :ios, '9.0'
target 'SwiftR iOS' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for SwiftR iOS
target 'SwiftR iOSTests' do
inherit! :search_paths
# Pods for testing end
end
target 'SwiftR iOS Demo' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks # use_frameworks!
# Pods for SwiftR iOS Demo
end
target 'SwiftR Mac' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for SwiftR Mac
target 'SwiftR MacTests' do
inherit! :search_paths
# Pods for testing end
end
target 'SwiftR Mac Demo' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for SwiftR Mac Demo
end
我的 Xcode 项目已关闭,我尝试在终端中安装它: pod 安装
它运行并说:
Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.
我可以验证所有框架都没有安装:
我仍然去了 Xcode 项目,将其部署目标设置为 9.0 并尝试构建仍然,这是我得到的错误
我已经尝试清理并重新启动并删除 Xcode 派生数据
您的播客文件不包含任何 pods.
在 target TargetName do
和 end
行之间,您必须插入 pod SwiftR
以便 pod install
安装 SwiftR pod 并将其附加到该目标。取决于您实际使用的目标的名称。您可以在 Xcode.
编辑(反映评论)
第一次 运行 pod install
(假设有 pods 要安装)它会创建一个单独的项目文件,扩展名为 .xcworkspace。如果你打开了 xcodeproj,你必须退出它,然后只使用 xcworkspace。它将 pods 和您的主要项目文件打包在一个工作区中,以便文件正确编译等。
该教程的所有者回答了我的问题: 如果您将此示例用于任何用途,我希望您了解最新的 .NET Core、DNX/DNU、donet cli 等。如果您不知道最近的 .NET 更改,请注意,.NET Core 堆栈最近变化非常快,尚未达到 1.0 版。 SignalRDemo 存储库是更熟悉的 ASP.NET 4.5 堆栈的更好起点。
不过,您的描述听起来像是在尝试使用 SwiftR。在那种情况下,只需克隆 SwiftR 存储库,打开 SwiftR.xcodeproj,将目标更改为 iOS 演示应用程序,项目将 build/run in Xcode 7.