Xcode的错误和警告

1、This block declaration is not a prototype
我们定义一个没有参数的block,typedef void(^ButtonBlock)();
在Xcode9之前,不会报警告,但是在Xcode9之后,需要将其定义为`typedef void(^ButtonBlock)(void);

要想全部忽略这个警告,将 Target-Bulid Setting-Strict Prototypes设置为No

2、Block implicitly retains 'self'; explicitly mention 'self' to indicate this..
Target-Bulid Setting-implicit retain of 'self' within blocks设置为No

3、directory not found for optionXXX
你在Search Path配置了路径,但是工程里面找不到这个文件

Target-Bulid Setting- Library Search Paths 和 Framework Search Paths, 删掉编译报warning的路径即OK
Library Search Pathsxxx.a文件
Framework Search Pathsxxx.framework文件

4、集成高德地图报警告
ld: warning: direct access in function 'sgi::hashtable, int, sgi::hash, sgi::_Select1st >, sgi::equal_to, sgi::allocator >::_M_initialize_buckets(unsigned long)' from file '/Users/summer/Desktop/migu_git/ext-IOS/Pods/AMap3DMap/MAMapKit.framework/MAMapKit(MAMapKit-x86_64-master.o)' to global weak symbol 'sgi::__malloc_alloc_template<0>::__malloc_alloc_oom_handler' from file '/Users/summer/Desktop/migu_git/ext-IOS/Pods/AMap3DMap/MAMapKit.framework/MAMapKit(MAMapKit-x86_64-master.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

Other Linker Flags 添加 -w

将持续更新。。。

你可能感兴趣的:(Xcode的错误和警告)