Date: Wed, 24 Oct 2001 15:28:25 -0700 From: Denis Serenyi <dserenyi@panasas.com> To: freebsd-hackers@freebsd.org Subject: C++ code in the FreeBSD kernel Message-ID: <70E7B42B-C8CE-11D5-ACE1-003065675568@panasas.com>
next in thread | raw e-mail | index | archive | help
Has anyone out there tried to get C++ code running in the freebsd kernel (like as a .ko)? I have a piece of code that I got working in userland, and would like to port it in the kernel (I had anecdotal evidence that it worked). The major problem is that the library, when in kernel, uses a whole bunch of kernel specific routines (not surprisingly), some of which are inline C functions. I believe it will be necessary to define _KERNEL in order to get all this to work correctly, but having that flag enabled causes code to be compiled which is not C++ friendly (functions with variable names "new", implicit type casts from void*... things that are ok in C but not in C++). I am also investigating the possibility of tweaking compiler options in such a way to allow these sorts of errors / warnings to be ignored. If anyone has any experience and advice for this situation, I would love to hear it! Thanks! Denis Serenyi Please cc me as I am not on this mailing list. I didn't find anything in the archives on this topic, but I apologize if it has been beaten to death. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?70E7B42B-C8CE-11D5-ACE1-003065675568>