libedit and g++
Simon Barner
barner at in.tum.de
Sun Jul 13 16:41:30 PDT 2003
Hi,
> > cat test.c
> #include <stdio.h>
> #include <histedit.h>
>
It will link, when you wrap the include with an extern "C" statement:
extern "C" {
#include <histedit.h>
}
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 <sys/types.h>
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* ==== Editing ====
*/
@@ -178,5 +182,9 @@
#define H_LOAD 14 /* , const char *); */
#define H_SAVE 15 /* , const char *); */
#define H_CLEAR 16 /* , void); */
+
+#ifdef __cplusplus
+}
+#endif
#endif /* _h_editline */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030714/bfea9612/attachment.bin
More information about the freebsd-hackers
mailing list