This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: how to reference a lib*.so instead of using -I blat.jar
Heitzso writes:
> My assumption is I should be able to not use -I and instead pick
> up the -ljsapi somehow to inform gcj re how the missing classes
> would look.
When you compile a file using gcj, there are three stages:
.class -> .s (the compiler)
.s -> .o (the assembler)
.o -> .so (the linker)
-I tells the compiler where to look.
-l tells the linker where to look.
> gcj $GCJ_FLAGS \
> -I /opt/IBMJava2-142/jre/lib/graphics.jar \
> -I ~/tts/freetts/lib/cmulex.jar \
> -I ~/tts/freetts/lib/en_us.jar \
> -c -o $TLIB/libfreetts.so \
> $CVS_DIR/tools/lib/freetts.jar \
> $CVS_DIR/tools/lib/cmulex.jar \
> $CVS_DIR/tools/lib/cmu_us_kal.jar \
> -L$TLIB -ljsapi \
You need -shared -fpic somewhere on this line.
Andrew.