运行几年前做的项目,发现各种编译报错,一个一个解决记录下:

  1、Xcode(Xcode9)编译运行报错,但是在 issue navigatior 栏看不到错误信息;

    解决方案:在 show report navigator 栏查看编译错误信息:

  Showing All Messages

  The operation couldn’t be completed. Unable to log in with account '**@**.com'. (The login details for account '**@**.com' were rejected.)

    

    根据错误信息显示,说这个账户失效了(之前公司的Apple ID),需要在偏好设置中移除相应账户即可。

    

    继续编译,下一个报错信息:

  2、error: implicit declaration of function 'ether_ntoa' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

strcpy(temp, (char *)ether_ntoa(LLADDR(sdl)));

    解决方案:找到错误位置,引用类库:

    导入这三个头文件即可,
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <net/ethernet.h>     然后上面那行代码会有一个警告:"Incompatible pointer types passing 'caddr_t' (aka 'char *') to parameter of type 'const struct ether_addr *'" ;
    可以在LLADDR的前面加上(const struct ether_addr *) 也就是这样:
    strcpy(temp, (char *)ether_ntoa((const struct ether_addr *)LLADDR(sdl)));
    这样就没有警告了。

  3、.xib: Compiling IB documents for earlier than iOS 7 is no longer supported. 工程是14年之前 Xcode创建的,升级到Xcode9后报错。

    解决方案:将builds For 改成 iOS10之后就可以了。

    

    解决完成,大功告成,编译运行成功。接下来就是各种适配问题了 。


Xcode 编译运行旧项目报错解决之路的更多相关文章

  1. 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

    运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...

  2. Android——eclipse下运行android项目报错 Conversion to Dalvik format failed with error 1解决

    在eclipse中导入android项目,项目正常没有任何错误,但是运行时候会报错,(clean什么的都没用了.....)如图: 百度大神大多说是jdk的问题,解决: 右键项目-Properties如 ...

  3. quick3.3final版创建项目报错解决

    PHP Notice:  Undefined index: QUICK_V3_ROOT in 405,469,497,520,551这5行代码都访问了一个环境变量$_ENV['QUICK_V3_ROO ...

  4. Mac运行React Native安卓项目报错解决

    传送门参考: 下面的这个链接很详细了,一步一步就好.... https://github.com/NARUTOyuyang/React-Native 然而在运行react-native run-and ...

  5. npm run dev运行Vue项目报错:Node Sass does not yet support your current environment

    导入Vue项目后,#npm run dev 报错: error in ./src/pages/hello.vue Module build failed: Error: Node Sass does ...

  6. 运行springboot项目报错 Error running 'ResourceApplication': Command line is too long. Shorten comma

    方法1 IDEA 运行报错:Error running '***': Command line is too long 技术标签: IDEA     Error running 'Test': Com ...

  7. IDEA新建SpringMVC项目报错解决办法

    网页运行的错误: HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundE ...

  8. 运行gulp项目报错:AssertionError: Task function must be specified。

    一.问题描述: gulp项目在本地windows 10机器上跑没有任何问题,但是放在centos 7虚拟机上跑报错:AssertionError: Task function must be spec ...

  9. 【原创】Eclipse导入Android项目报错解决

    1.点击报错的项目--->右键--->Properties--->选择Android--->将Project Build Target选择其一勾上-->Is Librar ...

随机推荐

  1. input设置为disabled,表单无法提交后台解决方法

    <input name="country" id="country" size=12 value="disabled提交时得不到该值 " ...

  2. Java Web代码审计流程与漏洞函数

    常见框架与组合 常见框架 Struts2 SpringMVC Spring Boot 框架执行流程 View层:视图层 Controller层:表现层 Service层:业务层 Dom层:持久层 常见 ...

  3. MYSQL之路之表

  4. ignoreContentAdaptWithSize

    使用cocosStudio 中 的Text控件时,要设定text.ignoreContentAdaptWithSize(true); 设定控件(0.5,0.5)锚点位置不随文本长度变化而变化.

  5. 转:unittest的几种运行方式

    #unittest-test.py import unittestfrom demo import RunMainimport HtmlTestRunner class TestMethod(unit ...

  6. fader

    fader在音频处理中是比较基础的处理.通常用于平滑的调节音量,或是音频的渐入和渐出效果. 比较常见的fader有line和cubic线型的fader. line fader即fader的渐变过程是线 ...

  7. 关于Dev-C++的安装以及基本使用方法

    我觉得Dev-C++是一款小巧方便的编译器,就给那些刚刚学习编程的同学讲一下这个软件的安装和基本的编译以及一些使用的技巧. (完全是傻瓜式的截图和教程,内容过于冗余,主要是考虑到这些新生没有接触过编程 ...

  8. MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement.

    MYSQL导入CSV格式文件数据执行提示错误(ERROR 1290): The MySQL server is running with the --secure-file-priv option s ...

  9. Makefile export

    1) 1.在(parent,上层的)makefile中export出来变量,子makefile(sub make)中,是可以访问的. 2. 而同一级别的makefile(可通过makefile中内置变 ...

  10. SparkStreaming个人记录

    一.SparkStreaming概述 SparkStreaming是一种构建在Spark基础上的实时计算框架,它扩展了Spark处理大规模流式数据的能力,以吞吐量高和容错能力强著称. SparkStr ...