2010-01-27 01:06:18     rt_dev_ioctl() undefined!

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-01-27 01:06:18     rt_dev_ioctl() undefined!

zhang zhihua (CHINA)

Message: 85169   

 

当调用函数 rt_dev_ioctl 时,提示:  undefined reference to `_rt_dev_ioctl'

 

我在程序中已经包含的头文件如下:

 

#include <sys/mman.h>

#include <sys/time.h>

#include <unistd.h>

#include <stdlib.h>

#include <math.h>

#include <stdio.h>

#include <string.h>

#include <signal.h>

#include <getopt.h>

#include <time.h>

#include <native/task.h>

#include <native/timer.h>

#include <native/sem.h>

#include <rtdm/rttesting.h>

 

还差头文件吗?

TranslateQuoteReplyEditDelete

 

 

2010-01-28 03:08:02     Re: rt_dev_ioctl() undefined!

Yi Li (CHINA)

Message: 85216   

 

你需要连接到:librtdm

 

-Yi

QuoteReplyEditDelete

 

 

2010-01-28 20:38:38     Re: rt_dev_ioctl() undefined!

zhang zhihua (CHINA)

Message: 85270   

 

Hi,Yi:

 

是哪个目录的lib呢?我已经包含了/home/uClinux-dist/staging/usr/lib,里面有rtmd的链接库啊...

TranslateQuoteReplyEditDelete

 

 

2010-01-28 21:23:57     Re: rt_dev_ioctl() undefined!

Yi Li (CHINA)

Message: 85272   

 

缺省应该编译librtdm.a (或者librtdm.so)的,我也不清楚为什么你那边没有。你可以看看xenomai的编译过程,是否编了librtdm.

 

-Yi

QuoteReplyEditDelete

 

 

2010-01-29 00:35:44     Re: rt_dev_ioctl() undefined!

zhang zhihua (CHINA)

Message: 85273   

 

/home/uClinux-dist/staging/usr/lib目录下这两个都有,但是还是不行...

TranslateQuoteReplyEditDelete

 

 

2010-01-29 01:27:54     Re: rt_dev_ioctl() undefined!

Yi Li (CHINA)

Message: 85275   

 

你是怎么编译的?

QuoteReplyEditDelete

 

 

2010-01-29 01:50:42     Re: rt_dev_ioctl() undefined!

zhang zhihua (CHINA)

Message: 85278   

 

我直接make编译,编译里面的那个例程latency.c都过不去,Makefile如下:

 

XENO_PATH = /home/uClinux-dist/staging/usr

CFLAGS = -I$(XENO_PATH)/include -I/usr/include/

LDFLAGS = -L$(XENO_PATH)/lib -Wl,-elf2flt

 

CC =bfin-uclinux-gcc

 

LDLIBS += -lnative -lm -lpthread

 

EXEC=main

OBJS=main.o

 

all:$(EXEC)

$(EXEC):$(OBJS)

$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)

TranslateQuoteReplyEditDelete

 

 

2010-01-29 02:34:40     Re: rt_dev_ioctl() undefined!

Yi Li (CHINA)

Message: 85279   

 

LDLIBS += -lnative -lm -lpthread -lrtdm

 

-Yi

QuoteReplyEditDelete

 

 

2010-01-29 03:27:46     Re: rt_dev_ioctl() undefined!

zhang zhihua (CHINA)

Message: 85316   

 

thank you ,Yi,是我搞错了,我一开始加成-lrmtd了...

TranslateQuoteReplyEditDelete

Attachments

    Outcomes