From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH kvm-unit-tests 2/4] Introduce a C++ wrapper for the kvm APIs Date: Mon, 29 Nov 2010 11:30:49 +0200 Message-ID: <4CF372C9.7040909@redhat.com> References: <1290595933-13122-1-git-send-email-avi@redhat.com> <1290595933-13122-3-git-send-email-avi@redhat.com> <20101128114930.GA11685@redhat.com> <4CF25608.4090408@redhat.com> <20101128144935.GD12874@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1645 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908Ab0K2Jax (ORCPT ); Mon, 29 Nov 2010 04:30:53 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAT9UqFW011165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 29 Nov 2010 04:30:53 -0500 In-Reply-To: <20101128144935.GD12874@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/28/2010 04:49 PM, Michael S. Tsirkin wrote: > On Sun, Nov 28, 2010 at 03:15:52PM +0200, Avi Kivity wrote: > > On 11/28/2010 01:49 PM, Michael S. Tsirkin wrote: > > >> +++ b/api/kvmxx.cc > > >> @@ -0,0 +1,168 @@ > > >> +#include "kvmxx.h" > > >> +#include > > >> +#include > > >> +#include > > > > > >I just realized this is wrong: I think you should wrap > > >the headers in extern "C". Same for other headers. > > > > I think system headers already do this > > (otherwise it won't link - > > int foo() is different than extern "C" { int foo(void); }) > > okay, but they aren't there for linux/kvm.h, are they? I don't think they are needed - they only declare structures and constants, not functions. -- error compiling committee.c: too many arguments to function