找回密码
 立即注册
收起左侧

Qt5.15.2静态编译 qqmljskeywords_p.h出现T_OF/T_FROM/T_CLASS等未定义

1
回复
353
查看
[复制链接]
累计签到:3 天
连续签到:1 天
来源: 2024-5-8 16:56:37 显示全部楼层 |阅读模式
1Qter豆
大家好,请教一下静态编译Qt5.15.2源码时,在parser/qqmljskeywords_p.h中出现T_OF、T_FROM等未定义问题,如何解决?

In file included from parser/qqmljslexer.cpp:42:
parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify2(const QChar*, int)':
parser/qqmljskeywords_p.h:84:21: error: 'T_OF' is not a member of 'QQmlJS::Lexer'
return Lexer::T_OF;

parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify4(const QChar*, int)':
parser/qqmljskeywords_p.h:196:29: error: 'T_FROM' is not a member of 'QQmlJS::Lexer'
return int(Lexer::T_FROM);

parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify5(const QChar*, int)':
parser/qqmljskeywords_p.h:291:27: error: 'T_CLASS' is not a member of 'QQmlJS::Lexer'
return Lexer::T_CLASS;

parser/qqmljskeywords_p.h:349:31: error: 'T_SUPER' is not a member of 'QQmlJS::Lexer'
return int(Lexer::T_SUPER);

parser/qqmljskeywords_p.h:382:70: error: 'T_YIELD' is not a member of 'QQmlJS::Lexer'
return (parseModeFlags & Lexer::YieldIsKeyword) ? Lexer::T_YIELD : Lexer::T_IDENTIFIER;

parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify6(const QChar*, int)':
parser/qqmljskeywords_p.h:422:29: error: 'T_EXPORT' is not a member of 'QQmlJS::Lexer'
return Lexer::T_EXPORT;

parser/qqmljskeywords_p.h:509:77: error: 'T_STATIC' is not a member of 'QQmlJS::Lexer'
return (parseModeFlags & Lexer::StaticIsKeyword) ? int(Lexer::T_STATIC) : int(Lexer::T_IDENTIFIER);

parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify7(const QChar*, int)':
parser/qqmljskeywords_p.h:592:31: error: 'T_EXTENDS' is not a member of 'QQmlJS::Lexer'
return Lexer::T_EXTENDS;

parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify8(const QChar*, int)':
parser/qqmljskeywords_p.h:752:33: error: 'T_REQUIRED' is not a member of 'QQmlJS::Lexer'
return Lexer::T_REQUIRED;

parser/qqmljskeywords_p.h: In function 'int QQmlJS::classify9(const QChar*, int)':
parser/qqmljskeywords_p.h:848:75: error: 'T_COMPONENT' is not a member of 'QQmlJS::Lexer'
return (parseModeFlags & Lexer::QmlMode) ? int(Lexer::T_COMPONENT) : int(Lexer::T_IDENTIFIER);

parser/qqmljslexer.cpp: In member function 'int QQmlJS::Lexer::lex()':
parser/qqmljslexer.cpp:314:10: error: 'T_YIELD' was not declared in this scope
case T_YIELD:



编译配置参考的帖子:“https://blog.csdn.net/z609932088/article/details/125096281”
代码使用MaintenanceTool下载。

回复

使用道具 举报

累计签到:3 天
连续签到:1 天
2024-5-13 09:31:27 显示全部楼层
configure配置,这里路径修改成了我的QT安装路径:
configure.bat  -static -release -confirm-license  -opensource -opengl desktop -platform win32-g++  -prefix "D:\Qt\5.15.2\mingw81_32_static" -sql-sqlite  -sql-odbc -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -make libs  -nomake tools -nomake examples -nomake tests -skip qt3d  -skip qtcanvas3d -skip qtdatavis3d -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了