With only the following includes:

#include <rtl_cpp.h>
#include "testclass.h"

And the following line in the rtmodule.cpp code:

rtf0_Reference = open("/dev/rtf0", O_NONBLOCK + O_WRONLY);

I get "O_NONBLOCK", "O_WRONLY" and "open" undeclared.
Makefile is attached.

Ivan

On Friday 09 November 2001 15:35, Victor Yodaiken wrote:
> Since RTLinux offers read/write directly, I wonder what the problem is?
>
> On Fri, Nov 09, 2001 at 03:25:19PM +0100, Ivan Martinez wrote:
> >     What I need from unistd.h is to allow users to use the standard
> > open-read-write-close interface with realtime fifos, which AFAIK is
> > supposed to work in realtime code and it actually does in my non-C++
> > modules. The alternative is rtf_put-rtf_get, but then I can't say DSLib
> > completely encapsulates RTLinux' interface anymore.
> >     Ivan
> >
> > On Friday 09 November 2001 09:51, Chunky Kibbles wrote:
> > > On Thu, Nov 08, 2001 at 04:56:31PM +0100, Ivan Martinez wrote:
> > > > Anybody help me with this, or you won't have a brand new DSLib v1.3.0
> > > > supporting C++
> > > > ;-)
> > >
> > > <unistd snippage>
> > >
> > > What do you need from unistd.h? The problem is that if you're in
> > > suitable kernel space for a real-time module, you won't be allowed
> > > most of the functions in unistd. poll() is right out. fork() doesn't
> > > makes sense...
> > >
> > > Gary (-;
> > > -- [rtl] ---
> > > To unsubscribe:
> > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> >
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> > --
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
all: app.o rtl_cpp.o testclass.o setsmem printfifos

include /usr/src/rtlinux-3.1/rtl.mk

CRTBEGIN=`g++ -print-file-name=crtbegin.o` 
CRTEND=`g++ -print-file-name=crtend.o`

app.o: rtmodule.o testclass.o
	echo $(LD)
	echo $(CRTBEGIN)
	echo $(CRTEND)
	$(LD) -r -o app.o $(CRTBEGIN) rtmodule.o testclass.o $(CRTEND)
setsmem: setsmem.c
	$(CC) ${INCLUDE} -O2 -Wall setsmem.c -o setsmem
printfifos: printfifos.c
	$(CC) ${INCLUDE} -O2 -Wall printfifos.c -o printfifos

clean:
	rm -f *.o

test: all
	@echo "This is a simple RTLinux program"
	@echo "First we remove any existing rtl-modules"
	@echo "You may see error warnings from \"make\" - ignore them"
	@echo "Type <return> to continue"
	@read junk
	-rmmod sound
	-rmmod rt_process
	-rmmod frank_module
	-rmmod app
	-rmmod rtl_cpp
	(cd $(RTL_DIR); scripts/rmrtl)
	@echo "Now insert the fifo and scheduler"
	@echo "Type <return> to continue"
	@read junk
	(cd $(RTL_DIR); scripts/insrtl)
	@echo "Now insert the C++ support module"
	insmod rtl_cpp.o
	@echo "Now start the real-time tasks  module"
	@echo "Type <return> to continue"
	@read junk
	@insmod app.o
	@./setsmem
	@echo "Now let's stop the application"
	@echo "Type <return> to finish"
	@read junk
	@rmmod app
	@rmmod rtl_cpp

vtest2:
	@echo "First we remove any existing rtl-modules"
	@echo "You may see error warnings from \"make\" - ignore them"
	-rmmod testrtmod2
	rtlinux stop
	@echo "Now insert the fifo and scheduler"
	rtlinux start
	@echo "Now start the real-time tasks  module"
	@echo "Type <return> to continue"
	@read junk
	@insmod testrtmod2.o
	@myrtp/rtp 100 0.1 t /dev/rtf0 input /dev/rtf1 output&
	@./setsmem


include $(RTL_DIR)/Rules.make

Reply via email to