lkml.org 
[lkml]   [2005]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kbuild & C++
On Tue, Sep 06, 2005 at 01:23:56PM +0200, Budde, Marco wrote:
> Hi,
>
> for one of our customers I have to port a Windows driver to
> Linux. Large parts of the driver's backend code consists of
> C++.
>
> How can I compile this code with kbuild? The C++ support
> (I have tested with 2.6.11) of kbuild seems to be incomplete /
> not working.

If you really need C++ then creating your own ruleset in the Kbuild file
should do the trick.
Something like:

$(obj)/file.o: $(src)/file.cc

And you must provide rules for .cc -> .o

The link part may prove a bit difficult since you may have to link .c
and C++ code. Again writing your own linker ruler is probarly the way
forward.

I can give at a short look if you send something like a minimum set of
sample files (mixed .c and .C++ where you have tried doing some of the
obvious stuff yourself).

This is not about adding C++ to mainstrem kernel if someone thinks so,
this is just about helping Marco.

Sam
-
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/

\
 
 \ /
  Last update: 2005-09-06 23:44    [W:0.313 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site