This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

--main and static libs


With gcj, I often link executables with only --main and libs named on the
command line, e.g.:

gcj --main=tcl.lang.Shell -ljacl -o jaclsh

That works well only if libjacl is a shared object.  If it is a static archive,
it fails to resolve tcl::lang::Shell::class$ because of the order gcj passes its
arguments to ld.  My workaround is to run jvgenmain alone:

jvgenmain tcl.lang.Shell >jacl_main.c
gcj jacl_main.c -ljacl -o jaclsh

Anybody think this is a bug?  I tried to look at it.  Unfortunately I do not
understand what toplev.c is doing well enough.

--
Jeff Sturm
jeff.sturm@commerceone.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]