mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Use C++ in kernel module?
@ 2007-03-30  3:37 Conke Hu
  2007-03-30  3:49 ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Conke Hu @ 2007-03-30  3:37 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Is it possible to use C++ in linux kernel module? how?
I've tested but failed, there is an unknown symbol in the .o file from
c++ source code.

Conke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Use C++ in kernel module?
  2007-03-30  3:37 Use C++ in kernel module? Conke Hu
@ 2007-03-30  3:49 ` Jan Engelhardt
  2007-03-30  6:59   ` Bongani Hlope
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2007-03-30  3:49 UTC (permalink / raw)
  To: Conke Hu; +Cc: Linux Kernel Mailing List


On Mar 30 2007 11:37, Conke Hu wrote:
>
> Is it possible to use C++ in linux kernel module? how?
> I've tested but failed, there is an unknown symbol in the .o file from
> c++ source code.

You answered it yourself. Linux does not have a C++ runtime.
It is possible to use a very limited set of C++ features, usually not 
worth the fight.


Jan
-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Use C++ in kernel module?
  2007-03-30  3:49 ` Jan Engelhardt
@ 2007-03-30  6:59   ` Bongani Hlope
  2007-03-30 14:53     ` Alistair John Strachan
  0 siblings, 1 reply; 4+ messages in thread
From: Bongani Hlope @ 2007-03-30  6:59 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Conke Hu, Linux Kernel Mailing List

On Friday 30 March 2007 05:49:14 Jan Engelhardt wrote:
> On Mar 30 2007 11:37, Conke Hu wrote:
> > Is it possible to use C++ in linux kernel module? how?
> > I've tested but failed, there is an unknown symbol in the .o file from
> > c++ source code.
>
> You answered it yourself. Linux does not have a C++ runtime.
> It is possible to use a very limited set of C++ features, usually not
> worth the fight.
>
>
> Jan

Do the "C++ kernel modules" crowd actually know C++? If they knew how C++ was 
designed, they would know that it requires some runtime support, which will 
stop them from asking this question over and over again. I'm begining to 
think that most of these questions are asked by people who think OO 
programing should used in the kernel (which is already done anyway)

--

A log may float in a river, but that does not make it a crocodile.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Use C++ in kernel module?
  2007-03-30  6:59   ` Bongani Hlope
@ 2007-03-30 14:53     ` Alistair John Strachan
  0 siblings, 0 replies; 4+ messages in thread
From: Alistair John Strachan @ 2007-03-30 14:53 UTC (permalink / raw)
  To: Bongani Hlope; +Cc: Jan Engelhardt, Conke Hu, Linux Kernel Mailing List

On Friday 30 March 2007 07:59, Bongani Hlope wrote:
> On Friday 30 March 2007 05:49:14 Jan Engelhardt wrote:
> > On Mar 30 2007 11:37, Conke Hu wrote:
> > > Is it possible to use C++ in linux kernel module? how?
> > > I've tested but failed, there is an unknown symbol in the .o file from
> > > c++ source code.
> >
> > You answered it yourself. Linux does not have a C++ runtime.
> > It is possible to use a very limited set of C++ features, usually not
> > worth the fight.
> >
> >
> > Jan
>
> Do the "C++ kernel modules" crowd actually know C++? If they knew how C++
> was designed, they would know that it requires some runtime support, which
> will stop them from asking this question over and over again. I'm begining
> to think that most of these questions are asked by people who think OO
> programing should used in the kernel (which is already done anyway)

Not to mention this, attached to every single LKML email:

> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

http://www.tux.org/lkml/#s15-3

"Why don't we rewrite the Linux kernel in C++?"

"Why not add a C++ interface layer to the kernel to support C++ drivers?"

"Can we make the kernel headers C++-friendly?"

-- 
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-30 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30  3:37 Use C++ in kernel module? Conke Hu
2007-03-30  3:49 ` Jan Engelhardt
2007-03-30  6:59   ` Bongani Hlope
2007-03-30 14:53     ` Alistair John Strachan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®