[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxc, libxenstore: make the headers C++-friendly
Well, obviously you shouldn't leave it lying around. Can you do something like extern "C" { #define private mumblywurzle #include <xen/ring.h> #undef private } There are other headers that indirectly include ring.h. My code never includes it directly, and, as you have seen, the errors were far from specific. Trying to figure out who brought what header in and what the error means, and fighting to be able to use C++ properly on top of that is surely not something any of us prefers. Once again, this isn't C++. If there has to be an ugly workaround, put it in the C++ code. There should be no ugly workaround. I'll probably leave all the headers alone, implement my own C wrapper that exposes extern "C" functions and hides all the macro stuff, and build my C++ application on top of that intermediate layer. I just asked because I thought there might be some interest in being able to use the Xen code directly from C++ projects; if there isn't, that's fair enough. Thank you for all your comments! Cheers, Razvan Cojocaru _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |