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

tinyexpr compilation fails on keil-mdk #119

Open
xuziqianxin opened this issue Oct 22, 2024 · 0 comments
Open

tinyexpr compilation fails on keil-mdk #119

xuziqianxin opened this issue Oct 22, 2024 · 0 comments

Comments

@xuziqianxin
Copy link

我的英语不太好所以下面一段是机翻
My English is not very good, so the following paragraph is a machine translation.

我再keil-MDK上面使用这个项目,非常好用,但是在编译的时候除了一些问题导致无法编译。
I use this project on keil-MDK, which is very easy to use, but it can't be compiled except for some problems during compilation.

然后我尝试修改了一些代码解决了这个问题。
Then I tried modifying some code to fix the issue.

首先,需要在tinyexpr.c 或 tinyexpr.h中添加 #pragma anon_unions 修复匿名联合体的问题。
First, you need to add #pragma anon_unions to tinyexpr.c or tinyexpr.h to fix the problem with anonymous unions.

接着需要对三处 te_fun2 t = s->function 修改,ARMCC不支持 void 赋值所以需要进行强制类型转换修改为 te_fun2 t = (te_fun2)s->function。
Then you need to modify the three te_fun2 t = s-> functions, ARMCC does not support void assignment, so you need to do a cast conversion to change it to te_fun2 t = (te_fun2)s->function.

然后问题就解决了。
Then the problem was solved.

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

1 participant