compiling jars into libraries w/ dependencies

Bryce McKinlay
Thu May 3 06:40:00 GMT 2001 wrote:

> I'm trying to compile jars into shared libraries which contain dependencies
> on other jars. I can compile a jar with no external dependencies, but even I
> I compile the jar which is depended on into a shared lib, I cannot seem to
> get it to be recognized.

> In class `b':
> In method `b()':
> Cannot find file for class c.

Even if you are linking against a shared library, you must have either source
or a class file for "c" available at compile time. So, this particular error is
happening because or c.class is not visible to the compiler.

> what magic command-line do I pass to the second gcj to get it to compile?

-L. -lmyc

"-L." tells the linker to look in the current directory for things to link.
"-lmyc" tells it to link (in this case, create a dynamic link) against


  [ bryce ]

More information about the Java mailing list