[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ITL
- To: Development Discussions <developer at arabeyes dot org>
- Subject: ITL
- From: Moazzam Khan <moazzamk at gmail dot com>
- Date: Wed, 27 Oct 2004 14:41:51 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=Mss4yE6vU2vZk1tB/s9VblPh6/Vdv2IGLOvS7msSFptmayKETQES/jcQ4Kc1xmeBXuIIUsM7X7ssOsaPNv/BYnFW9o78Ae7QOxhIQuNF+g1N5eI82+Pa8Q2xHLjmtwli3273DL9hBsbbWVk3UOVxZ3Pyt827e1r2wBMmCeFwAwo=
Hi,
I was trying to compile swig interface for java, for itl and it
compiled fine. But, I get an exception when I try to run it. I tried
modifying the "i" file, but to no avail. i was hoping someone here
can help me out.
The exception I get at runtime is:
aahmad at linux:~/itl/itl> /opt/j2sdk1.4.2_05/bin/java JPrayer
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/aahmad/itl/itl/libitl_java.so:
/home/aahmad/itl/itl/libitl_java.so: undefined symbol: limitAngle180
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1482)
at java.lang.Runtime.load0(Runtime.java:737)
at java.lang.System.load(System.java:811)
at JPrayer.<clinit>(JPrayer.java:4)
Here are the libitl_java.i file's contents:
/************************************************************************
* $Id: libitl.i,v 1.1 2004/10/23 10:21:21 thamer Exp $
*
* ------------
* Description:
* ------------
* Copyright (c) 2004, Arabeyes, Thamer Mahmoud
*
* This an example SWIG interface file for the ITL libaray.
*
*
* -----------------
* Revision Details: (Updated by Revision Control System)
* -----------------
* $Date: 2004/10/23 10:21:21 $
* $Author: thamer $
* $Revision: 1.1 $
* $Source: /home/arabeyes/cvs/projects/itl/libs/swig/libitl.i,v $
*
* (www.arabeyes.org - under LGPL license - see COPYING file)
************************************************************************/
%module prayer
%{
#include "./libs/prayertime/src/prayer.h"
#include "./libs/hijri/src/hijri.h"
%}
%include "./libs/prayertime/src/prayer.h"
%include "./libs/hijri/src/hijri.h"
And here is what i used, to compile the library:
#!/bin/sh
swig -java libitl_java.i
gcc -fpic -c libitl_java_wrap.c libs/hijri/src/hijri.c
libs/prayertime/src/prayer.c -I/opt/j2sdk1.4.2_05/include
-I/opt/j2sdk1.4.2_05/include/linux
ld -shared prayer.o libitl_java_wrap.o hijri.o -o libitl_java.so
I have been trying to make this work since the time SWIG file's link
was posted here. It will be great, if anyone can point me in the right
direction.
Thanks,
Moazzam