clang: error: linker command failed with exit code 1 (use -v to see invocation)

可能的原因:

1:#imort 时倒入.m文件

2:在不同文件中声名了两次同一个全局变量,例如在一个.m文件中声明了一个变量

NSCalendarUnit NSCalendarUnitYMDHM=NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute;

在另一个文件中又声明了

NSCalendarUnit NSCalendarUnitYMDHM=NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute;

你可能感兴趣的:(clang: error: linker command failed with exit code 1 (use -v to see invocation))