From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 13 16:41:30 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EF8137B404 for ; Sun, 13 Jul 2003 16:41:30 -0700 (PDT) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87CF943F85 for ; Sun, 13 Jul 2003 16:41:29 -0700 (PDT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id 02225386AA; Mon, 14 Jul 2003 01:41:27 +0200 (CEST) Date: Mon, 14 Jul 2003 01:41:27 +0200 From: Simon Barner To: Priit Piipuu Message-ID: <20030713234127.GA537@zi025.glhnet.mhn.de> References: <20030714014658.GD5738@minerva.meskaliin.ee> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20030714014658.GD5738@minerva.meskaliin.ee> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de cc: hackers@freebsd.org Subject: Re: libedit and g++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 23:41:30 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, > > cat test.c > #include > #include >=20 It will link, when you wrap the include with an extern "C" statement: extern "C" { #include } This should probably by handled by the library header itself, here is a patch: --- histedit.h.orig Mon Jul 14 01:37:43 2003 +++ histedit.h Mon Jul 14 01:38:33 2003 @@ -48,6 +48,10 @@ #include #include =20 +#ifdef __cplusplus +extern "C" { +#endif + /* * =3D=3D=3D=3D Editing =3D=3D=3D=3D */ @@ -178,5 +182,9 @@ #define H_LOAD 14 /* , const char *); */ #define H_SAVE 15 /* , const char *); */ #define H_CLEAR 16 /* , void); */ + +#ifdef __cplusplus +} +#endif =20 #endif /* _h_editline */ --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/Ee4nCkn+/eutqCoRAlq2AJ9c/tEXybnLoVhrHNHcwOgKCHqQbQCfR1SC QpsJa7o6oRdd9rZqXPwzjeo= =WNZH -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--