[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ITL



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