This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Link errors
- To: Torsten Rüger <torsten dot rueger at firsthop dot com>
- Subject: Re: Link errors
- From: Tom Tromey <tromey at redhat dot com>
- Date: 10 Oct 2001 11:51:18 -0600
- Cc: java at gcc dot gnu dot org
- References: <3BC2AB97.3050501@firsthop.com>
- Reply-To: tromey at redhat dot com
>>>>> "Torsten" == Torsten Rüger <torsten.rueger@firsthop.com> writes:
Torsten> I must be doing something wrong here, can someone tell me what ?
Torsten> The compile rule is plain : gcj -c -o some.lo some.[class|java]
Torsten> and link along the lines of: gcj --main=myclass (2000 files).lo
Torsten> I get link errors by the ton, about 10000 of this style:
Torsten> test/TestModule.lo: In function
Torsten> `test::TestModule::startup(org::w3c::dom::Node*)':
Torsten> /tmp/platform/test/TestModule.java:34: multiple definition of
Torsten> `test::TestModule::startup(org::w3c::dom::Node*)'
Torsten> ./test/TestModule.lo:/tmp/platform/test/TestModule.java:34: first
Torsten> defined here
It sounds to me like you're linking in some class multiple times.
Without seeing the whole command line, I couldn't say exactly what is
going on (and even then maybe I couldn't).
You could use `nm' on the 2000 .lo files to see why there are
duplicate symbols. Then you could see where they come from.
Torsten> /tmp/platform/org/webmacro/directive/AlternateDirective.java:58:
Torsten> undefined reference to
Torsten> 'org::webmacro::directive::Directive__U24_NotVariableBuildException::class$'
Torsten> /tmp/platform/org/webmacro/directive/AlternateDirective.java:58:
Torsten> undefined reference to
Torsten> `org::webmacro::directive::Directive__U24_NotVariableBuildException::Directive__U24_NotVariableBuildException(java::lang::String*,
Torsten> java::lang::Exception*)'
Are these classes compiled and linked in?
Tom