* Problem with AClass.class
@ 2002-04-26 0:30 Ryszard Kabatek
2002-04-26 3:43 ` Bryce McKinlay
0 siblings, 1 reply; 8+ messages in thread
From: Ryszard Kabatek @ 2002-04-26 0:30 UTC (permalink / raw)
To: java
gcj (gcc version 3.1 20020325 (prerelease)) on linux
I got a linking error because of using the class member function:
AClass.class.getName()
/tmp/cc3aa1t7.o: In function `main':
/tmp/cc3aa1t7.o(.text+0x1d): undefined reference to `AClass::class$'
collect2: ld returned 1 exit status
What is wrong?
Regards
--
Ryszard Kabatek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-26 0:30 Problem with AClass.class Ryszard Kabatek
@ 2002-04-26 3:43 ` Bryce McKinlay
2002-04-26 8:39 ` Ryszard Kabatek
0 siblings, 1 reply; 8+ messages in thread
From: Bryce McKinlay @ 2002-04-26 3:43 UTC (permalink / raw)
To: Ryszard.Kabatek; +Cc: java
Ryszard Kabatek wrote:
>gcj (gcc version 3.1 20020325 (prerelease)) on linux
>
>I got a linking error because of using the class member function:
>AClass.class.getName()
>
>/tmp/cc3aa1t7.o: In function `main':
>/tmp/cc3aa1t7.o(.text+0x1d): undefined reference to `AClass::class$'
>collect2: ld returned 1 exit status
>
>What is wrong?
>
Given that the undefined reference is in "main", it seems like you
specified an incorrect --main class, or forgot to link in AClass?
regards
Bryce.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-26 3:43 ` Bryce McKinlay
@ 2002-04-26 8:39 ` Ryszard Kabatek
2002-04-26 10:09 ` Tom Tromey
0 siblings, 1 reply; 8+ messages in thread
From: Ryszard Kabatek @ 2002-04-26 8:39 UTC (permalink / raw)
To: Bryce McKinlay; +Cc: java
Bryce McKinlay wrote:
>
> Ryszard Kabatek wrote:
>
> >gcj (gcc version 3.1 20020325 (prerelease)) on linux
> >
> >I got a linking error because of using the class member function:
> >AClass.class.getName()
> >
> >/tmp/cc3aa1t7.o: In function `main':
> >/tmp/cc3aa1t7.o(.text+0x1d): undefined reference to `AClass::class$'
> >collect2: ld returned 1 exit status
> >
> >What is wrong?
> >
>
> Given that the undefined reference is in "main", it seems like you
> specified an incorrect --main class, or forgot to link in AClass?
>
> regards
>
> Bryce.
Hm, AClass is the --main class.
--
Ryszard Kabatek
Tel. (Softax) +48 (22) 517 38 31
Tel. kom. (Softax) +48 606 609 363
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-26 8:39 ` Ryszard Kabatek
@ 2002-04-26 10:09 ` Tom Tromey
2002-04-29 1:10 ` Ryszard Kabatek
0 siblings, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2002-04-26 10:09 UTC (permalink / raw)
To: Ryszard.Kabatek; +Cc: Bryce McKinlay, java
>>>>> "Ryszard" == Ryszard Kabatek <Ryszard.Kabatek@softax.pl> writes:
>> >/tmp/cc3aa1t7.o: In function `main':
>> >/tmp/cc3aa1t7.o(.text+0x1d): undefined reference to `AClass::class$'
>> >collect2: ld returned 1 exit status
Bryce> Given that the undefined reference is in "main", it seems like
Bryce> you specified an incorrect --main class, or forgot to link in
Bryce> AClass?
Ryszard> Hm, AClass is the --main class.
Then we need more information. How exactly did you compile your
program? Is it short enough to post here? What platform are you on?
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-26 10:09 ` Tom Tromey
@ 2002-04-29 1:10 ` Ryszard Kabatek
2002-04-29 2:13 ` Bryce McKinlay
0 siblings, 1 reply; 8+ messages in thread
From: Ryszard Kabatek @ 2002-04-29 1:10 UTC (permalink / raw)
To: tromey; +Cc: Bryce McKinlay, java
Tom Tromey wrote:
>
> >>>>> "Ryszard" == Ryszard Kabatek <Ryszard.Kabatek@softax.pl> writes:
>
> >> >/tmp/cc3aa1t7.o: In function `main':
> >> >/tmp/cc3aa1t7.o(.text+0x1d): undefined reference to `AClass::class$'
> >> >collect2: ld returned 1 exit status
>
> Bryce> Given that the undefined reference is in "main", it seems like
> Bryce> you specified an incorrect --main class, or forgot to link in
> Bryce> AClass?
>
> Ryszard> Hm, AClass is the --main class.
>
> Then we need more information. How exactly did you compile your
> program? Is it short enough to post here? What platform are you on?
>
> Tom
I compiled under linux (RH 7.1). The file AClass.java is one of the *.java.
The source is pretty large. I cannot post it.
gcj --main=AClass
--classpath=/home/rysio/programming/cvs/brelink_full/progs/gbp/actions /home/rysio/programming/cvs/brelink_full/progs/gbp/libs.jar
-I /home/rysio/programming/cvs/brelink_full/progs/gbp/actions *.java
Regards
--
Ryszard Kabatek
Tel. (Softax) +48 (22) 517 38 31
Tel. kom. (Softax) +48 606 609 363
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-29 1:10 ` Ryszard Kabatek
@ 2002-04-29 2:13 ` Bryce McKinlay
2002-04-29 8:02 ` Ryszard Kabatek
0 siblings, 1 reply; 8+ messages in thread
From: Bryce McKinlay @ 2002-04-29 2:13 UTC (permalink / raw)
To: Ryszard.Kabatek; +Cc: tromey, java
Ryszard Kabatek wrote:
>gcj --main=AClass
>
Should it be gcj --main=some.package.AClass ?
regards
Bryce.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-29 2:13 ` Bryce McKinlay
@ 2002-04-29 8:02 ` Ryszard Kabatek
2002-04-29 13:14 ` Tom Tromey
0 siblings, 1 reply; 8+ messages in thread
From: Ryszard Kabatek @ 2002-04-29 8:02 UTC (permalink / raw)
To: Bryce McKinlay; +Cc: tromey, java
Bryce McKinlay wrote:
>
> Ryszard Kabatek wrote:
>
> >gcj --main=AClass
> >
> Should it be gcj --main=some.package.AClass ?
>
> regards
>
> Bryce.
If I try it (gcj --main=mypackage.AClass) I get:
/tmp/ccjmo6vc.o: In function `main':
/tmp/ccjmo6vc.o(.text+0x1d): undefined reference to `mypackage::AClass::class$'
collect2: ld returned 1 exit status
The reason are the calls of AClass.class.getName();
Regards
--
Ryszard Kabatek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with AClass.class
2002-04-29 8:02 ` Ryszard Kabatek
@ 2002-04-29 13:14 ` Tom Tromey
0 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2002-04-29 13:14 UTC (permalink / raw)
To: Ryszard.Kabatek; +Cc: Bryce McKinlay, java
>>>>> "Ryszard" == Ryszard Kabatek <Ryszard.Kabatek@softax.pl> writes:
Bryce> Should it be gcj --main=some.package.AClass ?
Ryszard> If I try it (gcj --main=mypackage.AClass) I get:
Ryszard> /tmp/ccjmo6vc.o: In function `main':
Ryszard> /tmp/ccjmo6vc.o(.text+0x1d): undefined reference to `mypackage::AClass::class$'
Ryszard> The reason are the calls of AClass.class.getName();
I doubt it. Nobody else has problems with this feature.
I assume you are compiling and linking in AClass?
And that the fully qualified class name is "mypackage.AClass"?
One thing you could do is run "nm AClass.o | c++filt" and then send
the output. That might help us.
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-04-29 15:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-26 0:30 Problem with AClass.class Ryszard Kabatek
2002-04-26 3:43 ` Bryce McKinlay
2002-04-26 8:39 ` Ryszard Kabatek
2002-04-26 10:09 ` Tom Tromey
2002-04-29 1:10 ` Ryszard Kabatek
2002-04-29 2:13 ` Bryce McKinlay
2002-04-29 8:02 ` Ryszard Kabatek
2002-04-29 13:14 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).