这是我编译WatchKit 2应用程序时出现的警告消息
忽略文件 /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator3.1.sdk/System/Library/Frameworks//WatchKit.framework/WatchKit, 文件是为i386构建的,而不是被链接的体系结构 (x86_64的): /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator3.1.sdk/System/Library/Frameworks//WatchKit.framework/WatchKitld: 警告:忽略文件 /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator3.1.sdk/System/Library/Frameworks//Foundation.framework/Foundation, 文件是为i386构建的,而不是被链接的体系结构 (x86_64的): /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator3.1.sdk/System/Library/Frameworks//Foundation.framework/Foundation
最后,它无法编译
ld:入口点(_main)未定义。对于架构x86_64
构建设置中的架构容差为:i386和x86_64。
但是,如果我强制架构到x86_64(我不想永远申请我的项目)。还有一个错误
ld:非法文本重定位到
中的'non_lazy_ptr'
我根据stackoverflow中的一些答案添加了OTHER_CFLAGS = $(inherited) -read_only_relocs suppress
。
但是Xcode保留了相同的错误信息。
编辑:哦,我的另一个错误。这应该是OTHER_LDFLAGS =
......某事。
任何人都可以给我任何理想如何克服这一点。
非常感谢,
答案 0 :(得分:0)
我发现了问题。
因为我错误地将WatchKim扩展程序的WatchSimulator设置为matrix_values <- c(0.16, -0.4, -0.7, -0.1, -0.8, -0.1, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1.09,
0.7, -0.1, 0.85, -1.9, -0.8, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.65, -1.37, -2.22, 1.53,
0.79, 0.72, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -1.2, -.1, 1.2, 1.5, 1.6, 0.9, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.8,
-1.31, 0.57, -1.55, -1.34, 0.7, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.73, 0.4, 0.62, 0.2,
1.01, -0.52, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.49, 1.99, 1.11, -0.62, -3.22, -0.02, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1.33, -0.88, -0.95, 0.03, -0.88, -0.38, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -1.28, 2.24,
1.04, 0.08, 0, 0.54, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1.87, 0.72, -0.09, -0.29, -1.92, -0.91, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.41, 1.82, 2.34, 2.56, 1.12, 0.86, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.57,
0.83, -0.63, -1.69, -0.75, 0.59, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1.13, 2.74, 3.47, 1.96,
1.52, 0.99, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.68, 2.09, 1.87, 0.77, 0.69, -0.31, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 2.2, -0.23, -0.44, -1.4, -1.91, -0.98, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.07, 0.93,
0.25, -1.26, 0.05, 0.49, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 2.61, -0.22, -1.36, -1.36, -1.16,
-0.91, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.67, -0.39, -0.67, -1.12, -0.94, 0.24, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN,
0.91, -1.18, 1.27, -1.16, -0.38, -0.35, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.54, 0.94, 0.17,
-0.92, -1, -0.18, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.63, 1.19, -0.12, -2.02, -1.81, 0.98, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.62, 1.69, 1.96, -0.48, -0.31, -0.54, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.3,
1.04, 1.54, -0.63, 0.18, 0.74, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1.87, 0.32, -0.79, -0.75,
-0.71, -0.75, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.36, -0.52, 0.25, -0.47, -0.1, 0.29, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.18, 1.24, -0.56, -1.01, -1.05, -1.01, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.8, -0.35,
1.76, -0.9, 0.18, 0.14, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.81, -0.07, -0.8, -0.72, -0.16,
0.01, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.71, -0.29, 1.7, 0.88, 0.97, 0.81, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.98,
0.7, 1.99, 0.3, 0.2, -0.03, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -0.99, -0.08, 1.26, 0.19,
0.18, 0.81, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.8, 0.03, 0.34, -1.05, -0.34, 0.08, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, -1.87, 1.19, 1.03, 0.38, 0.09, 0.73, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.48, 1.25,
-0.15, -2.09, -1.05, 0.27, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.36, 1.05, 0.26, 0.41, 0.09,
0.18, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 0.61, 0.97, 0.84, -0.55, -0.39, 0.04, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN)
cor_matrix1 <- matrix(matrix_values, ncol = 37, nrow = 37)
item_names1 <- c('IC 26', 'IC 33', 'IC 38', 'IC 42', 'IC 44','IC 8','IC 15', 'IC 16', 'IC 18','IC 19','IC 25','IC 27','IC 14', 'IC 24','IC 11', 'IC 17', 'IC 20' ,'IC 23','IC 28','IC 30', 'IC 34', 'IC 35', 'IC 37','IC 39' ,'IC 49', 'IC 32','IC 36','IC 46','IC 2','IC 22','IC 43','IC 13','IC 21','IC 47','IC 1','IC 3','IC 12')
item_names <- c('IC 26', 'IC 33', 'IC 38', 'IC 42', 'IC 44','IC 8','IC 15', 'IC 16', 'IC 18','IC 19','IC 25','IC 27','IC 14', 'IC 24','IC 11', 'IC 17', 'IC 20' ,'IC 23','IC 28','IC 30', 'IC 34', 'IC 35', 'IC 37','IC 39','IC 49', 'IC 32','IC 36','IC 46','IC 2','IC 22','IC 43','IC 13','IC 21','IC 47','IC 1','IC 3','IC 12')
colnames(cor_matrix1) <- item_names1
rownames(cor_matrix1) <- item_names
dat <- melt(cor_matrix1[-38, ])
r45 <- ggplot(data = dat, aes(x = Var1, y = Var2)) +
geom_tile(aes(fill = value), color = "black") +
scale_fill_gradientn(colours = c("dark blue", "blue", "cyan", "green", "yellow", "red", "dark red"),
limit = c(-3, 4)) +
theme(axis.text.x = element_text(colour = "black", size = 6, angle = 0, hjust = .5, vjust = .5, face = "plain"),
axis.text.y = element_text(colour = "black", size = 6, angle = 0, hjust = .5, vjust = .5, face = "plain"),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
panel.background = element_blank())
。 Xcode自动选择了x86_64。
但是,Watch Simulator SDK不支持x86_64。因为所有当前的手表操作系统仅适用于32位架构。
从架构设置中删除i386 x86_64
后,Xcode使用i386架构构建我的目标。
然后警告和错误消失了。
非常感谢,