re: FW: Linux device driver using c++!
From: Dan Kegel
Date: Sun Feb 01 2004 - 10:05:54 EST
Jinu wrote:
Is there someway I can make use of a OS independent C++ code. This code has classes,
new, delete etc.. My plan was to build a static library using the C++ code and then
write a simple OS interface module which has the init, cleanup, read, write, ioctl
etc but calls C++ functions in the library.
Is this scenario possible?
Sure, just port it to C.
Seriously, you can do it in C++, but you'll hate yourself
afterwards, and nobody in the Linux community will support
you when you have problems. C++ just does not mix well
with the Linux kernel. This is not a shortcoming of the
Linux kernel; this is a fairly well-founded design decision,
discussed to death once every six months.
If you do decide to pursue it, do it in a way that does
not require any patches to the kernel source, and please
do NOT submit any patches related to this to the linux kernel mailing list.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/