This is the mail archive of the java@gcc.gnu.org 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]

Re: Link errors


>>>>> "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


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