关于用C++builder 10.3 建立android app 的问题,各位高手进来帮看一下,呼叫老妖版主....

jone7319 2019-05-05 04:02:44
公司花了3.8万买的C++ builder 10.3,第一次试用就给雷到了. android sdk 和ndk 都已正确安装并在SDK Manager中配置好相应文件路径,我用于调试的魅族16手机已成功安装驱动。在IDE中建立一个空白的Multi-device Application项目,窗口类型选Android,IDE自动选中魅族手机16th. 在没有写任何代码的情况下,我按F9编译,直接报10个一样的错误,错误提示如下:
[bccaarm Error] string.h(204): functions that differ only in their return type cannot be overloaded string.h(45): previous declaration is here
看了提示信息,应该是函数返回类型的错误,但是,但是,我没有写任何代码呢,怎么会有错?怎么改呢?

...全文
457 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
km_lxt 2020-03-23
  • 打赏
  • 举报
回复
Patching string.h file for Android While using the C++ Builder for creating an FMX application for Android, you may have issues with the header when creating an SDK for Android. Please follow these steps to patch the string.h file manually: Double click the error message. The IDE opens the string.h file. Go to the line containing the following comment: /* Const-correct overloads. Placed after FORTIFY so we call those functions, if possible. */ Change the line after the comment mentioned above as shown below: Before #if defined(__cplusplus) && defined(__clang__) After #if defined(__cplusplus) && defined(__clang__) && ((__clang_major__ > 3) || (__clang_minor__ > 4))
weixin_43196267 2019-11-21
  • 打赏
  • 举报
回复
该替换哪个版本的string.h,我ndk-r17的替换成ndk-r16的没有用
志山之家 2019-09-30
  • 打赏
  • 举报
回复
问题已解决。替换掉string.h就OK了 用哪一个版本的string.h替换
jone7319 2019-05-08
  • 打赏
  • 举报
回复
问题已解决。替换掉string.h就OK了
ooolinux 2019-05-07
  • 打赏
  • 举报
回复
10.3这个版本有重大改变,编译器改为支持C++17的。其实用10.2.3才比较保险,有免费社区版。
ooolinux 2019-05-07
  • 打赏
  • 举报
回复
CB写安卓的可能确实不多。你是64位还是32位项目?
jone7319 2019-05-07
  • 打赏
  • 举报
回复
看来没什么人用CB了
ooolinux 2019-05-07
  • 打赏
  • 举报
回复
一般10.x.2或者10.x.3这样的小版本是较稳定的,修正了一些bug的。
  • 打赏
  • 举报
回复
10.2.1测试没这个问题,网上查了一下,是NDK中带的头文件兼容性的问题,你升级到10.3.1就好了,或者你升级一下安卓NDK
jone7319 2019-05-05
  • 打赏
  • 举报
回复

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧