龙芯3A5000编译Qt5.13.2报错处理

错误一:error: #error Target architecture was not detected as supported by Double-Conversion.

解决方法:

1、打开报错的文件为qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h

2、在defined(__mips__) ||后添加宏 defined(__loongarch__)

3、添加完后重新执行make即可。

参考文章:龙芯5000编译Qt环境报错_龙芯编译qt_芒果黑的博客-CSDN博客

错误二:error: cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses precision [-fpermissive]

解决方法:

1.打开报错文件qtscript/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h 
 
2、找到报错位置

u.asBits.payload = reinterpret_cast(ptr);
u.asBits.payload = reinterpret_cast(const_cast(ptr));

3、把int32_t改为int64_t就可以了

参考文章:Qt报错cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses precision [-fpermissive]_error: cast from ‘qtjsc::jscell*’ to ‘int32_t’ {ak_芒果黑的博客-CSDN博客

 

你可能感兴趣的:(qt,javascript)