Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 编译 #4

Open
mingyaaaa opened this issue May 26, 2020 · 4 comments
Open

Windows 编译 #4

mingyaaaa opened this issue May 26, 2020 · 4 comments

Comments

@mingyaaaa
Copy link

请教一下
我在Win10下编译出现
G:\MyProgram\awtk-quickjs\3rd\quickjs\quickjs.h(663): error C2440: “类型强制转换”: 无法从“JSVa
lue”转换为“JSValue”
G:\MyProgram\awtk-quickjs\3rd\quickjs\quickjs.h(663): warning C4033: “JS_DupValue”必须返回值
G:\MyProgram\awtk-quickjs\3rd\quickjs\quickjs.h(672): error C2440: “类型强制转换”: 无法从“JSVa
lue”转换为“JSValue”
G:\MyProgram\awtk-quickjs\3rd\quickjs\quickjs.h(672): warning C4033: “JS_DupValueRT”必须返回值
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(138): error C2061: 语法错误: 标识符“packed_u64”
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(138): error C2059: 语法错误:“;”
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(138): error C2449: 在文件范围内找到“{”(是否缺少
函数头?)
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(140): error C2059: 语法错误:“}”
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(146): error C2061: 语法错误: 标识符“packed_u16”
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(146): error C2059: 语法错误:“;”
G:\MyProgram\awtk-quickjs\3rd\quickjs\cutils.h(146): error C2449: 在文件范围内找到“{”(是否缺少
等一些语法错误,是什么问题

@xianjimli
Copy link
Member

quickjs本身不支持Visual studio编译。如果要在windows下编译,好像要用mingw编译(我没试过)。

@mingyaaaa
Copy link
Author

我 又在Ubuntu 上试了一下 出现
e/ym/awtk/tools src/c/tk_quickjs.c
src/c/tk_quickjs.c: In function 'get_WIDGET_PROP_CURSOR':
src/c/tk_quickjs.c:5538:37: error: 'WIDGET_PROP_CURSOR' undeclared (first use in this function); did you mean 'get_WIDGET_PROP_CURSOR'?
return jsvalue_create_string(ctx, WIDGET_PROP_CURSOR);
^~~~~~~~~~~~~~~~~~
get_WIDGET_PROP_CURSOR
src/c/tk_quickjs.c:5538:37: note: each undeclared identifier is reported only once for each function it appears in
src/c/tk_quickjs.c:5539:1: warning: control reaches end of non-void function [-Wreturn-type]
}
这个和 Ubuntu有关吗

@xianjimli
Copy link
Member

不好意思。麻烦更新一下awtk和awtk-quickjs

@wildfire810
Copy link

我在win用mingw64和在嵌入式linux(我魔改了一些代码),都成功运行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants