c - linux/bin/ld : cannot find -lrtdk Xenomai

标签 c linux real-time xenomai

/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lrtdk

我在 ld 的联机帮助页中找不到与此相关的任何内容。
http://www.cs.ru.nl/lab/xenomai/exercises/ex01/Exercise-1.html
以下是生成文件:

    ###### CONFIGURATION ######

### List of applications to be build
APPLICATIONS = hello

### Note: to override the search path for the xeno-config script, use "make XENO=..."


### List of modules to be build
MODULES =

### Note: to override the kernel source path, use "make KSRC=..."



###### USER SPACE BUILD (no change required normally) ######
ifeq ($(KERNELRELEASE),)
ifneq ($(APPLICATIONS),)

### Default Xenomai installation path
XENO ?= /usr/xenomai

XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)

### Sanity check
ifeq ($(XENOCONFIG),)
all::
    @echo ">>> Invoke make like this: \"make XENO=/path/to/xeno-config\" <<<"
    @echo
endif


CC=$(shell $(XENOCONFIG) --cc)

CFLAGS=$(shell $(XENOCONFIG) --xeno-cflags) $(MY_CFLAGS)

LDFLAGS=$(shell $(XENOCONFIG) --xeno-ldflags) $(MY_LDFLAGS) -lnative

# This includes the library path of given Xenomai into the binary to make live
# easier for beginners if Xenomai's libs are not in any default search path.
LDFLAGS+=-Xlinker -rpath -Xlinker $(shell $(XENOCONFIG) --libdir)

LDFLAGS+= -lrtdk

all:: $(APPLICATIONS)

clean::
    $(RM) $(APPLICATIONS) *.o

endif
endif



###### SPECIAL TARGET RULES ######
rtprint: rtprint.c
    $(CC) $(CFLAGS) $? $(LDFLAGS) -lrtdk -o $@



###### KERNEL MODULE BUILD (no change required normally) ######
ifneq ($(MODULES),)

### Default to sources of currently running kernel
KSRC ?= /lib/modules/$(shell uname -r)/build

OBJS     := ${patsubst %, %.o, $(MODULES)}
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
PWD      := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

### Kernel 2.6
ifeq ($(findstring 2.6,$(KSRC)),2.6)

obj-m        := $(OBJS)
EXTRA_CFLAGS := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix $(ADD_CFLAGS)

all::
    $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules

### Kernel 2.4
else

ARCH    ?= $(shell uname -i)
INCLUDE := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/compat -I$(KSRC)/include/xenomai/posix
CFLAGS  += $(shell $(MAKE) -s -C $(KSRC) CC=$(CC) ARCH=$(ARCH) SUBDIRS=$(PWD) modules) $(INCLUDE)

all:: $(OBJS)

endif

## Target for capturing 2.4 module CFLAGS
modules:
    @echo "$(CFLAGS)"

clean::
    $(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers
    $(RM) -R .tmp*

endif

请帮忙。

最佳答案

链接器缺少库文件 librtdk[.a|.so]。

关于c - linux/bin/ld : cannot find -lrtdk Xenomai,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9767274/

相关文章:

c - MinGW 上函数 'getaddrinfo' 的隐式声明

c - 相同的表达式,但在函数中使用时返回值不同

c - 非阻塞套接字

linux - 从 laSTLog 捕获错误(unix & bash)

在 2D 显示中布局矩形窗口的算法

c - 段错误双指针重新分配

linux - 使用 A key 通过 B 框从 A ssh 到 C,而不将其存储在 B 机器上

python - 无法远程访问 RabbitMq 服务器

mysql - 将 web 套接字消息保存到 mysql 时如何防止数据丢失?

python - 如何干净地退出多处理脚本?