KLD module with C++ iostreams ?
M. Warner Losh
imp at bsdimp.com
Wed Apr 20 19:33:43 PDT 2005
In message: <37e1316605042019072b5d7a0e at mail.gmail.com>
Aziz KEZZOU <opensource.enthousiat at gmail.com> writes:
: Hi hackers,
: I am wondering if I can use c++ iostreams inside the kernel ?
: After all the code : cout << "Hello world!" << endl;
: ends accessing the stdout just like : printf("Hello world!\n"); right ?
Just like, yes. Exactly the same thing as, no. The details matter
here. There's a lot of code to make this happen.
: So if I could compile my KLD module with static linkage to libstdc++,
: that should be ok, right ?
No.
: Any one did or knows how to do this ?
I've done C++ in the kernel before. IT is realtively easy to get very
basic functioanlity. You won't have streams, exceptions, etc.
However, to have all the features of C++ would take a lot of work.
Warner
More information about the freebsd-hackers
mailing list