Linux Netfilter discussions
 help / color / mirror / Atom feed
* linking problem
@ 2009-07-31 15:03 Kortheo
  0 siblings, 0 replies; only message in thread
From: Kortheo @ 2009-07-31 15:03 UTC (permalink / raw)
  To: netfilter

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-31 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 15:03 linking problem Kortheo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox