解决LibclangError: [Error 193] %1 不是有效的 Win32. To provide e Config.set_library_path() or Config.

本文介绍了解决在Windows 7 64位系统中遇到的LibclangError错误的方法,建议使用32位版本的Python、pyyaml及pyCheetah,并提供了tolua项目的下载链接及最新bindings-generator的获取方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:win7 64位及以上

LibclangError: [Error 193] %1 不是有效的 Win32. To provide

e Config.set_library_path() or Config.set_library_file()

解决方案:Python、pyyaml、pyCheetah都用32位版本

(ps:tolua目录下README.mdown里有下载链接)
如果还不行的话,就去github上下载最新的bindings-generator

(ps:下载地址: https://github.com/guojian822/bindings-generator)

qwe123@qwe123-virtual-machine:~/CLionProjects/Code/cmph-2.0$ gcc test.c -o example -lcmph cc1: fatal error: test.c: No such file or directory compilation terminated. qwe123@qwe123-virtual-machine:~/CLionProjects/Code/cmph-2.0$ cd .. qwe123@qwe123-virtual-machine:~/CLionProjects/Code$ gcc test.c -o example -lcmph test.c: In function ‘main’: test.c:10:29: error: too few arguments to function ‘cmph_config_new’ 10 | cmph_config_t *config = cmph_config_new(); | ^~~~~~~~~~~~~~~ In file included from test.c:1: /usr/include/cmph.h:49:16: note: declared here 49 | cmph_config_t *cmph_config_new(cmph_io_adapter_t *key_source); | ^~~~~~~~~~~~~~~ test.c:12:5: warning: implicit declaration of function ‘cmph_config_set_keys’; did you mean ‘cmph_config_set_b’? [-Wimplicit-function-declaration] 12 | cmph_config_set_keys(config, keys, n_keys); | ^~~~~~~~~~~~~~~~~~~~ | cmph_config_set_b test.c:20:54: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] 20 | unsigned int id = cmph_search(hash, keys[i], strlen(keys[i])); | ^~~~~~ test.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ 1 | #include <cmph.h> +++ |+#include <string.h> 2 | #include <stdio.h> test.c:20:54: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch] 20 | unsigned int id = cmph_search(hash, keys[i], strlen(keys[i])); | ^~~~~~ test.c:20:54: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
最新发布
07-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

VCHH

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值