在Makefile中加入启用MIG的选项后,编译出现一下错误:
error: 6lowpan.h: No such file or directory
...
...
找不到头文件,但是检查环境变量都没有问题。 原来在调用MIG时需要指定包含的文件, 通过使用mig tool的 -I 选项。
在Makefile中生成MIG的命令加入头文件的路径
BUILD_EXTRA_DEPS = UdpReport.py
UdpReport.py:UDPReport.h
mig -I$(LOWPAN_ROOT)/tos/lib/net python -target=null -python-classname=UUdpReport UdpReport.h udp_report -o $@
error: 6lowpan.h: No such file or directory
...
...
找不到头文件,但是检查环境变量都没有问题。 原来在调用MIG时需要指定包含的文件, 通过使用mig tool的 -I 选项。
在Makefile中生成MIG的命令加入头文件的路径
BUILD_EXTRA_DEPS = UdpReport.py
UdpReport.py:UDPReport.h
mig -I$(LOWPAN_ROOT)/tos/lib/net python -target=null -python-classname=UUdpReport UdpReport.h udp_report -o $@
本文介绍了一种解决MIG编译过程中找不到头文件错误的方法。通过在Makefile中为MIG命令添加-I选项并指定正确的头文件路径,可以有效避免此类编译错误。
2361

被折叠的 条评论
为什么被折叠?



