[ATTACHEMENT TO:] BUG REPORT. Loading native-libs dynamically end up with cast-error...

Linuxhippy linuxhippy@web.de
Wed Nov 27 11:51:00 GMT 2002


Hi!

First I want to say, that I´m really happy how freindly the people are 
here! (especally tom and you!)

Hmm, the problem is, that the problem does still exist:


>tes: Loader.o bi.o lib-bte.so
>        $(GCJ) --main=Loader -o $@ bi.o Loader.o
>  
>
This does mean, you linked bte to tes at compile-time, not at run-time.
Its needed, that the compilier doesnt know the class bte at all, it is 
only allowed to now its interface bi, which must be the same for all 
"plugin"-classes i want to use.

What I want to do is to write an app, to parse the name of the class 
that should loaded out of a config-file and the load the class whithout 
knowing how the class is built.
This should generally work, and it does so in interprted-mode, but it 
semms libgcj has problems with native code....

Your executable already knows bte at compile-time because its into 
libbte.so, thats not what I want to do ;-((
It should be enough to only compile the interface into the executable....

>You have to make sure lib-bte.so is on your LD_LIBRARY_PATH, so I just
>ran it like this:
>
>$ LD_LIBRARY_PATH=./ tes
>
Of cource I did this. Na dit also worked for me when I did like you did, 
but thats not late-linking (sorry, dont know the exact name).

I want to thank you very much for your time, and that you´ve tried my 
examples, thats really freindly and helpful. I´ve already sent a bug-report
 bug-report to bugs-gcc but t semms nobody has answered ;-((

Thanks, thx, thx, thx!

Could you please try to compile it without bte linked in? I know I´m 
nerving, but I cant belive that I´m to stupid (I´m really not very 
intelligent *g*) to get this up`n`running.

Mfg Linuxhippy



More information about the Java mailing list