This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj and handling own packages question


On Tue, 13 Jan 2004, Tom Tromey wrote:

> >>>>> "Ranjit" == Ranjit Mathew <rmathew@hotmail.com> writes:
>
> Ranjit> Florian Weitling wrote:
> >> $ gcj -I . --main=Anonymizer *.o
> >> /Temp/cc7ATHYp.o(.text+0x39): In function `main':
> >> /Temp/cc7qOYPg.i: undefined reference to `Anonymizer::class$'
> >> collect2: ld returned 1 exit status
>
> Ranjit> You haven't given much information and this might
> Ranjit> sound "Duh!", but are you *sure* that you spelled
> Ranjit> "Anonymizer" correctly for the class definition
> Ranjit> inside the corresponding Java source file?

Yes, of course: All files have been in use with JDK 1.4 from SUN.

> Another common problem in this area is not to use the fully qualified
> class name.

You mean, for class bla.blubb.Arf just say "Arf"? Tried that, too, didn't
work. The interesting fact here is, that it compiled the main class
"Anonymizer" and its companions, but doesn't find it for linking and
creating the executable. Hope I got it right...

One problem for me as I code regularly in Java not C/C++ is the lack of
simplicity. Sorry. I know that's not the main intention for gcj, but while
I have to type "javac bla.blubb.Arf.java" and all needed files are
compiled (yes, I know, no linking necessary...) as needed. And: For errors
I get at least a line number, although Java compilation errors are often
not selfexplaining, too.

But, I try to keep my esprit/elan :)
and if you still wish to help me...

Florian Weitling


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