I'm new to irrlicht and jirr. I am trying to get jirr to work but am having a bear of a time. I think I know the problem but cannot find the solution.
I downloaded and installed (made irrlicht.a) irrlicht 1.3.1. I downloaded and snagged jirr.jar, jirrhlng05.jar and jnewton.jar.
Now here's where it gets tricky. I am running linux.
So I need (I assume) to find to find irrlicht_wrap.so. (or .a). But I don't see anything like this in the 3 packages I downloaded (jirr, jirr-src and irrlicht). I do see dlls for Windows in
jirr-1.3.1/bin/irrlicht_wrap.dll
jirr-1.3.1/bin/irrklang_wrap.dll
But no Linux libraries. Could some kind soul point me to where I would find or create these?
Thanks!
Jirr and the irrlicht_wrap
Re: Jirr and the irrlicht_wrap
I got a little farther as I found this page:
https://sourceforge.net/cvs/?group_id=112018
So I connected cd'd into $HOME/src/irrlicht-1.3/source
I then issued:
it checked out okay and now I have a directory called jirr-dev
In there is a file called readme.txt with the following:
I'm not sure if I need callbaks but I said what the heck!
I made sure I installed swig 1324.
I patched my swig as required.
I renamed Makefile.1324 to Makefile
I changed IRRLICHT variable in the Makefile to point to where I believe it needs to:
It seems to work fine. It chugs for a bit and then I hit a slew of errors. The first of which are:
It goes on for some time.
Any ideas?
https://sourceforge.net/cvs/?group_id=112018
So I connected cd'd into $HOME/src/irrlicht-1.3/source
I then issued:
Code: Select all
cvs -z3 -d:pserver:anonymous@jirr.cvs.sourceforge.net:/cvsroot/jirr co -P jirr-dev
In there is a file called readme.txt with the following:
Code: Select all
Important: Please use swig 1324 and Makefile1324 if you do need callbacks. Newer versions (including 1.3.31) will produce incorrect code. here resulting in occasional crashes.
The current and released builds still depend on Makefile1324.
But be aware: swig1324 also needs patching to make everything work as in the binaries! YOu have to update two files. Otherwise there will be errors on make time and some new features will disappear. These files can be found in patchSwig/1324
Lib\java\arrays_java.i
Lib\java\enums.swg
Simply take them and overwrite the old ones in your swih installation (you may backup your files if wanted).
enums.swg will force you to add
%define SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG "470:Thread/reentrant unsafe wrapping, consider returning by value instead." %enddef
to your own .i files when using enums. But that is the only negtive effect I am aware of. irrlicht.i already contains that line.
-------------------------------------------------------------------------------
Before running the Makefile, you should download and extract the iirlicht-engine.
Once this is done, correct the Makefile to point at the location where you extracted the source.
After that, you should be able to run the command
make
...
I made sure I installed swig 1324.
Code: Select all
swig -version
SWIG Version 1.3.24
Copyright (c) 1995-1998
University of Utah and the Regents of the University of California
Copyright (c) 1998-2004
University of Chicago
Compiled with g++ [i686-pc-linux-gnu]
Please see http://www.swig.org for reporting bugs and further information
I renamed Makefile.1324 to Makefile
I changed IRRLICHT variable in the Makefile to point to where I believe it needs to:
Code: Select all
IRRLICHT_HOME=../..
Code: Select all
src/native/irrlicht_wrap.cxx:1292: error: cannot convert ‘irr::scene::E_DEBUG_SCENE_TYPE*’ to ‘irr::scene::E_DEBUG_SCENE_TYPE’ in assignment
src/native/irrlicht_wrap.cxx: In function ‘void Java_net_sf_jirr_JirrJNI_set_1SGUISpriteFrame_1textureNumber(JNIEnv*, _jclass*, jlong, jlong)’:
src/native/irrlicht_wrap.cxx:30484: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30484: error: ‘arg1’ was not declared in this scope
src/native/irrlicht_wrap.cxx:30484: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30484: error: expected primary-expression before ‘)’ token
src/native/irrlicht_wrap.cxx:30484: error: expected `;' before numeric constant
src/native/irrlicht_wrap.cxx:30489: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30489: error: expected primary-expression before ‘)’ token
src/native/irrlicht_wrap.cxx: In function ‘jlong Java_net_sf_jirr_JirrJNI_get_1SGUISpriteFrame_1textureNumber(JNIEnv*, _jclass*, jlong)’:
src/native/irrlicht_wrap.cxx:30498: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30498: error: ‘arg1’ was not declared in this scope
src/native/irrlicht_wrap.cxx:30498: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30498: error: expected primary-expression before ‘)’ token
src/native/irrlicht_wrap.cxx:30498: error: expected `;' before numeric constant
src/native/irrlicht_wrap.cxx:30503: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30503: error: expected primary-expression before ‘)’ token
src/native/irrlicht_wrap.cxx: In function ‘void Java_net_sf_jirr_JirrJNI_set_1SGUISpriteFrame_1rectNumber(JNIEnv*, _jclass*, jlong, jlong)’:
src/native/irrlicht_wrap.cxx:30512: error: ‘SGUISpriteFrame’ is not a member of ‘irr::gui’
src/native/irrlicht_wrap.cxx:30512: error: ‘arg1’ was not declared in this scope
Any ideas?