where should the .o files end up?

Jeff Sturm jeff.sturm@appnet.com
Tue Jul 18 13:54:00 GMT 2000


Per Bothner wrote:
> 
> Jeff Sturm <jeff.sturm@appnet.com> writes:
> 
> > I want:
> >
> >   gcj -c f1.java f2.java
> >   ar -r classes.a f1.o f2.o
> 
> That doesn't just work?  Have you tried it?

Sure that works.  Bad example... no -d, no package name.  Here's another
try... instead of:

  javac -d classes pkg1/f1.java pkg2/f2.java
  jar -cf foo.jar classes/pkg1/f1.class classes/pkg2/f2.class

I must do:

  mkdir classes/pkg1
  gcj -c pkg1/f1.java -o classes/pkg1/f1.o
  mkdir classes/pkg2
  gcj -c pkg2/f2.java -o classes/pkg2/f2.o
  ar -r foo.a classes/pkg1/f1.o classes/pkg2/f2.o

That takes a few more steps.  I have makefiles that almost completely
mask the difference, but it can still be a nuisance when converting from
bytecode to native builds.

--
Jeff Sturm
jeff.sturm@appnet.com


More information about the Java mailing list