File: README

package info (click to toggle)
rtlinux 3.1pre3-3
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 4,896 kB
  • ctags: 4,228
  • sloc: ansic: 26,204; sh: 2,069; makefile: 1,414; perl: 855; tcl: 489; asm: 380; cpp: 42
file content (25 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
This examples illustrates use of C++ in RTLinux programs.
You need to be at the console to see the output from insmod app.o.

To use C++ in RTLinux modules, you need to:

- insert rtl_cpp.o support module.

- #include rtl_cpp.h in your RT-program

- if you have statically allocated objects that
need initializing, call __do_global_ctors_aux() in init_module
and __do_global_dtors_aux() in cleanup_module (see hello.o)

- link your module with crtbegin.o and crtend.o; the
order is important (see Makefile)

- the rtl.mk file provides needed CXXFLAGS

Try inserting app.o module as an example.

Thanks to Yunho Jeon <yunho@skylark.snu.ac.kr> for sharing the
ideas and code on the RTLinux mailing list.

Michael Barabanov <baraban@fsmlabs.com>.