This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Segfault with trivial SWT snippet
> >Oh, but by the way, I couldn't get things to link when passing the
> >-findirect-dispatch flag. I always got errors like:
>
> > gcj -I `pkg-config --variable=CLASSPATH swt-gtk`
> > -findirect-dispatch -fpic -fjni -c -o Snippet1.o Snippet1.java
> > gcj -lswt --main=Snippet1 -o Snippet1 Snippet1.o
> > /tmp/cceivJSw.o: In function `main':
> > ccUlWBRV.i:(.text+0x2b): undefined reference to `Snippet1::class$'
>
> >So for now I'm just not using an of the extra flags recommended above.
>
Is your "Snippet1" class located inside of a package? If so you will
have use "--main" flag as so: --main=packagename.Snippet1
--
Harpal Grover
President
Harpal Grover Consulting Inc
--
Harpal Grover
President
Harpal Grover Consulting Inc