linking a .so with libgcj.a ?

Andi Vajda andi@osafoundation.org
Wed Dec 15 18:42:00 GMT 2004


On 2004年12月15日, Andrew Haley wrote:
> Basically. But the capabilities of linkers varies widely between
> systems, even when the linkers are all variants of GNU ld.
>> > Or did the person behind the Mingw tool chain
> > do something special ? If it is smart enough to produce something
> > that works on Windows, wouldn't the same apply on Linux ?
>> Probably. But to be sure I'd have to try it.

I'm willing to give it a try myself, is it enough to just force CCFLAGS to 
contain -fPIC when building libgcj.a ?
> It may well be that your problem has nothing to do with PIC, but it's
> worth fixing that first. As has been pointed out in this thread,
> there are other potential problems.

Yes, dynamically loading classes was mentionned. I don't do that, neither does 
the Java Lucene codebase which I'm compiling in.
Libgcj may do this too but I haven't hit a class load error on Windows yet 
where the python extension DLL is statically linked with libgcj.a and about 
6 Mb in size. The project is a year old now, so I guess/hope dynamically 
loading classes is not a required feature in this case.
Andi..


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /