Compile Qt5.5.1 With Gcc7.2 Under Arch

When compiling qt5.5.1 under arch, I meet some compile errors because of the newer version compiler of python3 and gcc, so just do some record.

1. Python3 Type Error

Problem dump:

TypeError: %x format: an integer is required, not float

Repair is easy, just find the error code and use // to instead /.
In pytho3, 2/5 = 0.4, whereas 2//5 = 0;

2. Char16_t* Conversion Error

Problem dump:

/API/JSStringRef.cpp:40:50: error: invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive]
return OpaqueJSString::create(chars, numChars).leakRef();

Solution: Try to repair the code according to this https://codereview.qt-project.org/#/c/193548

此条目发表在LINUX, 软件安装分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。