我正在尝试编译一个包含 MRuby 库并执行一些简单的 ruby 代码的 Contiki 应用程序。问题是,我不知道如何在编译中包含 MRuby 库。
这是项目:https ://github.com/matus-tomlein/contiki-mruby-example/tree/wrong
我要执行的代码在contiki-mruby-example.c
. 问题可能出在Makefile
. 这是我目前拥有的:
CONTIKI_PROJECT = contiki-mruby-example
all: $(CONTIKI_PROJECT)
CONTIKIDIRS += mruby/include
CFLAGS += -v
CFLAGS += -Imruby/include
CONTIKI = contiki
include $(CONTIKI)/Makefile.include
执行时出现以下错误make
:
ld: can't map file, errno=22 file 'mruby/include' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我要包含的 MRuby 代码位于mruby/include
.
这是一个类似的问题:How to use external libraries and compile them with a Contiki application
But using TARGET_LIBFILES
or LDFLAGS
didn't help. 我想那是因为我正在编译纯源代码,而不是库。
我可能缺少一个简单的答案。感谢您的任何建议。