1、未正确使用相关标记。
添加-frtti即可
../third_party/icu/icu4c/source/i18n/unum.cpp:640:31: error: use of dynamic_cast requires -frtti
const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
2、MinGW不支持Windows异常处理__try
../third_party/flutter/engine/flutter/fml/thread.cc:84:3: error: use of undeclared identifier '__try'
__try {
^
1 error generated
3、数据类型转换问题
在mac、ubuntu上编译只有几处报错,而使用MinGW编译时全部报错,而且是针对模板类型的构造函数。如果给构造函数赋值一个double的常量也可以正常编译,但如果是变量就会报错,使用(float)强转的话也可以正常编译;直接将一个double赋值给一个float变量也没有问题。
解决方法:添加-Wno-c++11-narrowing
../foundation/arkui/ace_engine/frameworks/core/components_ng/layout/box_layout_algorithm.cpp:43:17: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing]
layoutConstraint.maxSize.Height() - safeArea.topRect_.Height() - safeArea.bottomRect_.Height() };
4、constexpr变量的值需要在编译时就要确定,对于构造函数也需要使用constexpr进行修饰才行。
constexpr explicit Color(uint32_t value) : colorValue_(ColorParam {
.value = value }) {
}
../foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/scroll/inner/scroll_bar.h:38:17: error: constexpr variable 'PRESSED_BLEND_COLOR' must be initialized by a constant expression
constexpr Color PRESSED_BLEND_COLOR = Color(0x19000000);
^ ~~~~~~~~~~~~~~~~~
5、自定义的enum、变量名与系统gdi头文件中定义的宏冲突。
添加NOGDI宏定义解决。
defines = [ “NOGDI” ]
../third_party/one/one.h:29:5: error: expected identifier
ALTERNATE,
^
C:/Users/client/Downloads/llvm-mingw-20230614-msvcrt-x86_64/include/wingdi.h:100:19: note: expanded from macro 'ALTERNATE'
#define ALTERNATE 1
6、暂不清楚是什么问题,直接注释掉了。
../foundation/arkui/ace_engine/frameworks/core/components/common/layout/grid_system_manager.cpp:121:31: error: cannot pass non-trivial object of type 'RefPtr<GridContainerInfo>' to variadic function; expected type from format string was 'void *' [-Wnon-pod-varargs]
LOGD("parent addr:%p",parent);
~~ ^~~~~~
../foundation/arkui/ace_engine/frameworks/base/log/log_wrapper.h:43:48: note: expanded from macro 'LOGD'
#define LOGD(fmt, ...) PRINT_LOG(DEBUG, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
../foundation/arkui/ace_engine/frameworks/base/log/log_wrapper.h:39:19: note: expanded from macro 'PRINT_LOG'
##__VA_ARGS__); \
^~~~~~~~~~~
7、未定义的符号
使用动态库引用静态库,而静态库使用的是dllexport函数导出,动态库使用visibility(“default”)导出,导出动态库中所有函数均不能正常导出。
llvm-mingw-20230614-msvcrt-x86_64\bin/clang++ -target x86_64-pc-windows-gnu -rtlib=compiler-rt -stdlib=libc++ -lunwind -lpthread -Qunused-arguments -fuse-ld=lld -o ./test.exe @./test.exe.rsp
ld.lld: error: undefined symbol: Two::toString()
8、win32已有的函数,在项目中重新定义
根据警告信息重新声明需要添加dllimport,使用dllimport标记后,出现警告信息2:重新声明方法不能使用dllimport。这个提示前后矛盾。后尝试一个函数定义多次是可以的,但不能有多个实现。
暂未找到好的解决方案
警告提示1
In file included from ../foundation/arkui/napi/native_engine/impl/quickjs/quickjs_native_engine.cpp:38:
../third_party/bounds_checking_function/include/securec.h:527:21: warning: 'wscanf_s' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
SECUREC_API int wscanf_s(const wchar_t *format, ...);
^
C:/Users/client/Downloads/llvm-mingw-20230614-msvcrt-x86_64/include/sec_api/wchar_s.h:278:23: note: previous declaration is here
_CRTIMP int __cdecl wscanf_s(const wchar_t *_Format, ...);
警告提示2
In file included from ../foundation/arkui/napi/native_engine/native_safe_async_work.cpp:22:
../commonlibrary/c_utils/base/include/securec.h:106:9: warning: -------dllimport-------- [-W#pragma-messages]
#pragma message("-------dllimport--------")
^
../commonlibrary/c_utils/base/include/securec.h:244:21: warning: redeclaration of 'swprintf_s' should not add 'dllimport' attribute [-Wdll-attribute-on-redeclaration]
SECUREC_API int swprintf_s(wchar_t *strDest, size_t destMax, const wchar_t *format, ...);
^
C:/Users/client/Downloads/llvm-mingw-20230614-msvcrt-x86_64/include/sec_api/wchar_s.h:256:15: note: previous declaration is here
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
9、mingw头文件与win10头文件关于此方法声明不一致
暂未找到好的解决方案
STDMETHOD(GetGlyphImageFormats)(
UINT16 glyphId,
UINT32 pixelsPerEmFirst,
UINT32 pixelsPerEmLast,
_Out_ DWRITE_GLYPH_IMAGE_FORMATS* glyphImageFormats
) PURE;
virtual DWRITE_GLYPH_IMAGE_FORMATS STDMETHODCALLTYPE GetGlyphImageFormats() = 0;
../third_party/flutter/skia/src/ports/SkScalerContext_win_dw.cpp:505:47: error: too many arguments to function call, expected 0, have 4
auto rs = fontFace4->GetGlyphImageFormats(glyph.getGlyphID(), 0, UINT32_MAX, &f);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/client/Downloads/llvm-mingw-20230614-msvcrt-x86_64/include/dwrite_3.h:8577:58: note: 'GetGlyphImageFormats' declared here
virtual DWRITE_GLYPH_IMAGE_FORMATS STDMETHODCALLTYPE GetGlyphImageFormats(
10、 undefined symbol: __declspec(dllimport) bind
添加ws2_32库即可
libs = [ “ws2_32” ]
ld.lld: error: undefined symbol: __declspec(dllimport) bind
>>> referenced by obj/third_party/openssl/crypto/bio/crypto_source/b_sock2.o:(BIO_bind)
文章浏览阅读767次。基于JSP后台的志愿者小程序_jsp参赛作品
文章浏览阅读364次,点赞4次,收藏5次。它可以帮助企业完成固定资产的全生命周期管理,提升资产管理效率,降低成本。它涉及公司的长期投资、资产保值和资产报表的准确性。资产处理:当资产达到预定使用期或无法继续使用时,系统需要记录资产处理信息,包括处理日期、处理方法和价格。资产维护:系统需要提醒公司定期维护资产,以确保资产的正常使用。同时,系统还应记录维护的详细信息,包括维护日期、维护内容和维护费用。资产应用:系统需要记录使用单位、使用人员、使用次数等每个资产的使用情况。该系统可实现固定资产的高效管理,提升资产管理效率,降低成本。
文章浏览阅读518次。1.app应用的真正入口是ActivityThread类中的main()方法。 2.调用Looper.prepareMainLooper()方法。 3.调用prepare(false)方法,这里的threadLocal其实就是一个map集合。这样新创建了一个Looper对象,添加到集合中。 在Looper的构造器中,初始化了消息队列并且获取当前的线程 4.调用myLoope..._源码 判断启动的activity是否是 instant app
文章浏览阅读1.2k次。这部分内容是之前那个依赖测试包问题看到的答案下面的,有一位大佬梳理了一下这个过程,我在这边翻译一下也供大家参考吧:步骤1在项目根目录下执行获取依赖报告的gradle,比如gradle -q app:dependencies 详细的可以看这里这可以提供与该问题有关的以ASCⅡ码呈现的树,它会帮助你判断哪些是有冲突的版本+--- com.android.support.t..._gradle license dependency report
文章浏览阅读415次,点赞5次,收藏4次。随着Android的发展,用户审美的不断提高,你的app不仅得足够好用,UI也得让人感觉赏心悦目,今天无意间打开CSDN看帖子时,发现点击底部导航栏时,图标是会播放动画的,一时好奇是如何实现的,然后就浅浅的研究了下~
文章浏览阅读3k次。1.针对误卸载yum卸载pythonrpm -qa|grep python|xargs rpm -e --allmatches --nodepswhereis python|xargs rm -fr2.卸载yumrpm -qa|grep yum|xargs rpm -e --allmatches --nodepswhereis yum|xargs rm -fr3.新建一个文..._centos8 误删yum和dnf安装yum和dnf
文章浏览阅读10w+次,点赞2次,收藏10次。句柄泄露调试(Handles Leak Debug) 一、概述 造成句柄泄露的主要原因,是进程在调用系统文件之后,没有释放已经打开的文件句柄。 对于句柄泄露,轻则影响某个功能模块正常运行,重则导致整个应用程序崩溃。在 Windows系统中, GDI 句柄上限是 12000 个,USER 句柄上限是 18000 个。 与 Windows 系统的设置不同,Linux 系统对进程可以调用的文件句柄_vs上进程最大句柄数和exe最大句柄数差异
文章浏览阅读2.1k次,点赞4次,收藏15次。在用DANet网络时候,Readme里面提到了处理数据集时,提到了要把cityscapes数据集转换为19类:Download the Cityscapes dataset and convert the dataset to 19 categories. It should have this basic structure.这时如果直接运行会产生下面的报错:Label Image ID: /home/xxx/data/Cityscapes/gtFine/train/cologne/colo_cityspaces数据集如何将33类缩减为19类
文章浏览阅读790次,点赞21次,收藏20次。跟Android一样,IDE启动第一件事情是下载Harmony SDK每个版本的SDK中都提供了三套API用来开发Java、Js、C++代码,版本上需要保持一致。不同的华为设备对SDK版本有不同要求,比如在测试中发现,我的API4的代码无法运行在P40上,改为API5就OK了。
文章浏览阅读5.4k次,点赞25次,收藏98次。mysql索引优化三范式存储引擎myisam和innodb锁事务explain查询优化主从复制读写分离linux命令高并发权限管理RBAC redis和memecache超卖微信支付第三方登录MVC get和postphp魔术方法常量 apache和ngiux 错误码 安全验证错误等级错误日志数组递归冒泡排序快速排序composer框架区别安全攻击设计模式tcp/udpsession面向对象多继承正则swoole设计模式AJAX大流量单点登陆SSO正反向代理负载均衡seo优化加密方式php8新特性_php面试题2023
文章浏览阅读116次。选择私人区块链技术:Hyperledger ComposerHyperledger Composer架构欢迎参加“选择私人区块链技术”系列的第二部分(第1部分在这里)。在每篇文章中,我们都会实现一个简单的用例来概述现有技术的作用以及它如何在企业中发挥作用。最初,这篇文章本来将是关于Hyperledger Fabric,但是在了解了Hyperled...
文章浏览阅读1.2k次,点赞3次,收藏10次。微信小程序从2023年9月15日开始,涉及处理用户个人信息的小程序开发者,需通过弹窗等明显方式提示用户阅读隐私政策等收集使用规则。为规范开发者的用户个人信息处理行为,保障用户合法权益,微信要求开发者主动同步微信当前用户已阅读并同意小程序的隐私政策等收集使用规则,方可调用微信提供的隐私接口。简而言之,就是调用某些涉及用户隐私api比如获取用户位置(wx.getLocation)、选择照片(wx.chooseImage)等api(隐私接口)前需要弹出隐私政策告知用户取得同意后方可正常使用功能。_小程序隐私协议