From: Kortheo <kortheo@kwanta.net>
To: netfilter@vger.kernel.org
Subject: linking problem
Date: Fri, 31 Jul 2009 17:03:44 +0200 [thread overview]
Message-ID: <60051.1249052624@kwanta.net> (raw)
Hey netfilter guys
I am tryin to write java binding for a little program of mine to netfilter_queue
here is source code for jnetfilter.c:
JNIEXPORT jlong JNICALL Java_com_kwanta_firewall_NetfilterQueue_nfqOpen
(JNIEnv * env, jclass clazz)
{
jlong pointer;
struct nfq_handle* handle;
handle = nfq_open();
//pointer = &handle;
return pointer;
}
Everything compiles fine:
**** Build of configuration Debug for project libjnetfilter ****
make all
Building file: ../jnetfilter.c
Invoking: GCC C Compiler
gcc -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"jnetfilter.d" -MT"jnetfilter.d" -o"jnetfilter.o" "../jnetfilter.c"
Finished building: ../jnetfilter.c
Building target: libjnetfilter.so
Invoking: GCC C Linker
gcc -shared -Wl,-soname=libjnetfilter.so -o"libjnetfilter.so" ./jnetfilter.o
Finished building target: libjnetfilter.so
but it the code does not run, and ldd gave me this:
ldd -d libjnetfilter.so
undefined symbol: nfq_open (./libjnetfilter.so)
linux-gate.so.1 => (0xb7f06000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7da7000)
/lib/ld-linux.so.2 (0xb7f07000)
im using ubuntu 8.04
can you please help me. Kind Regards
Kortheo
Message sent via Atmail Open - http://atmail.org/
reply other threads:[~2009-07-31 15:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=60051.1249052624@kwanta.net \
--to=kortheo@kwanta.net \
--cc=netfilter@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.