From: Eric Leblond <eric@inl.fr>
To: denis stauffer <denis.stauffer@gmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: libnetfilter_conntrack.so and C++
Date: Mon, 25 Sep 2006 14:39:45 +0200 [thread overview]
Message-ID: <1159187985.13157.7.camel@localhost.localdomain> (raw)
In-Reply-To: <2b76460a0609250151m51778379u34b0e89aecfbf219@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 643 bytes --]
Hi,
Le lundi 25 septembre 2006 à 10:51 +0200, denis stauffer a écrit :
> Hi everybody,
>
> I'm trying to develop a C++ programm wich uses
> libnetfilter_conntrack.so library. I've encountered a problem when
> linking the library : the called funtions in libnetfilter_contrack are
> not recognized.
> If some one has succeeded to use the libnetfilter_conntrack library
> with g++, please can you gve me some information about how to do it.
>
> Thank's in advance,
> Denis
Coud you try the following patch ?
BR,
--
Éric Leblond, eleblond@inl.fr
Téléphone : 01 44 89 46 39, Fax : 01 44 89 45 01
INL, http://www.inl.fr
[-- Attachment #1.2: libnetfilter_conntrack_g++.diff --]
[-- Type: text/x-patch, Size: 921 bytes --]
Index: include/libnetfilter_conntrack/libnetfilter_conntrack.h
===================================================================
--- include/libnetfilter_conntrack/libnetfilter_conntrack.h (revision 6670)
+++ include/libnetfilter_conntrack/libnetfilter_conntrack.h (working copy)
@@ -8,6 +8,18 @@
#ifndef _LIBNETFILTER_CONNTRACK_H_
#define _LIBNETFILTER_CONNTRACK_H_
+
+/* Disable inline keyword when compiling in strict ANSI conformance */
+#if defined(__STRICT_ANSI__) && !defined(__cplusplus)
+# define inline
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
#include <netinet/in.h>
#include <libnfnetlink/linux_nfnetlink.h>
#include <libnfnetlink/libnfnetlink.h>
@@ -332,6 +344,8 @@
extern void nfct_build_tuple(struct nfnlhdr *req, int size,
struct nfct_tuple *t, int type);
+#ifdef __cplusplus
+}
+#endif
-
#endif /* _LIBNETFILTER_CONNTRACK_H_ */
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2006-09-25 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 8:51 libnetfilter_conntrack.so and C++ denis stauffer
2006-09-25 11:18 ` Jan Engelhardt
2006-09-25 12:39 ` Eric Leblond [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1159187985.13157.7.camel@localhost.localdomain \
--to=eric@inl.fr \
--cc=denis.stauffer@gmail.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox