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] |
| Other format: | [Raw text] | |
On Wed, 14 Nov 2007 09:02:26 -0500, "Harpal Grover" wrote: > > > ccUlWBRV.i:(.text+0x2b): undefined reference to > > `Snippet1::class$' > > Is your "Snippet1" class located inside of a package? If so you will have > use "--main" flag as so: --main=packagename.Snippet1 That wasn't the bug in this particular case. But I appreciate you pointing the problem out, because when I first started with this Snippet1.java from the SWT website it did have a package statement and I did have exactly that problem. When I ran into that bug I was totally stumped until someone on IRC helped me figure out the problem. If someone could come up with a more helpful error message in this case, that would be really appreciated. Shouldn't the compiler be able to notice that when I pass --main=Snippet1 that there's no such class? And then it could error out with something like: Error: No class Snippet1 found for --main. (Perhaps Snippet1 exists in some.package.Snippet1 ?) -Carl
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |