This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
--main and static libs
- To: java-discuss at sources dot redhat dot com
- Subject: --main and static libs
- From: Jeff Sturm <jeff dot sturm at appnet dot com>
- Date: Tue, 09 Jan 2001 13:14:30 -0500
- Organization: Commerce One
- Reply-To: jeff dot sturm at commerceone dot com
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