SWT with GCJ

Discussion in 'Java' started by Patrix, Jul 4, 2005.

  1. Patrix

    Patrix Guest

    Hello,

    Did anyone succeed in compiling a SWT application with GCJ on Windows?
    If yes, could you please give some help, I tried with different SWT and
    GCJ versions, but I had no luck, or wasn't able to make them work.

    Here is the compile command:

    gcj --classpath=.;e:\swt\swt.jar -Le:\swt -lswt-win32-3064 --main=Test
    -o Test Test.java

    Here are the errors:

    C:\temp/ccEBaaaa.o(.text+0x1fd): In function
    `ZN4Test6centerEPN3org7eclipse3swt7widgets7DisplayEPNS3_5ShellE':
    E:/testing/swt/Test.java:14: undefined reference to
    `org::eclipse::swt::graphics::point::class$'
    C:\temp/ccEBaaaa.o(.text+0x29e):E:/testing/swt/Test.java:14: undefined
    reference to `org::eclipse::swt::graphics::point::point(int, int)'
    C:\temp/ccEBaaaa.o(.text+0x2f8): In function
    `ZN4Test4mainEP6JArrayIPN4java4lang6StringEE':
    E:/testing/swt/Test.java:19: undefined reference to
    `org::eclipse::swt::widgets::Display::class$'
    C:\temp/ccEBaaaa.o(.text+0x307):E:/testing/swt/Test.java:19: undefined
    reference to `org::eclipse::swt::widgets::Display::Display()'
    C:\temp/ccEBaaaa.o(.text+0x31b):E:/testing/swt/Test.java:20: undefined
    reference to `org::eclipse::swt::widgets::Shell::class$'
    C:\temp/ccEBaaaa.o(.text+0x339):E:/testing/swt/Test.java:20: undefined
    reference to
    `org::eclipse::swt::widgets::Shell::Shell(org::eclipse::swt::widgets::Display*,
    int)'
    C:\temp/ccEBaaaa.o(.text+0x388):E:/testing/swt/Test.java:24: undefined
    reference to `org::eclipse::swt::layout::FillLayout::class$'
    C:\temp/ccEBaaaa.o(.text+0x39f):E:/testing/swt/Test.java:24: undefined
    reference to `org::eclipse::swt::layout::FillLayout::FillLayout(int)'
    C:\temp/ccEBaaaa.o(.text+0x3dd):E:/testing/swt/Test.java:26: undefined
    reference to `org::eclipse::swt::widgets::Composite::class$'
    C:\temp/ccEBaaaa.o(.text+0x3fb):E:/testing/swt/Test.java:26: undefined
    reference to
    `org::eclipse::swt::widgets::Composite::Composite(org::eclipse::swt::widgets::Composite*,
    int)'
    C:\temp/ccEBaaaa.o(.text+0x415):E:/testing/swt/Test.java:27: undefined
    reference to `org::eclipse::swt::layout::RowLayout::class$'
    C:\temp/ccEBaaaa.o(.text+0x424):E:/testing/swt/Test.java:27: undefined
    reference to `org::eclipse::swt::layout::RowLayout::RowLayout()'
    C:\temp/ccEBaaaa.o(.text+0x462):E:/testing/swt/Test.java:29: undefined
    reference to `org::eclipse::swt::widgets::Label::class$'
    C:\temp/ccEBaaaa.o(.text+0x480):E:/testing/swt/Test.java:29: undefined
    reference to
    `org::eclipse::swt::widgets::Label::Label(org::eclipse::swt::widgets::Composite*,
    int)'
    C:\temp/ccEBaaaa.o(.text+0x4c9):E:/testing/swt/Test.java:32: undefined
    reference to `org::eclipse::swt::widgets::Button::class$'
    C:\temp/ccEBaaaa.o(.text+0x4e7):E:/testing/swt/Test.java:32: undefined
    reference to
    `org::eclipse::swt::widgets::Button::Button(org::eclipse::swt::widgets::Composite*,
    int)'
    C:\temp/ccEBaaaa.o(.text+0x530):E:/testing/swt/Test.java:35: undefined
    reference to `org::eclipse::swt::widgets::Canvas::class$'
    C:\temp/ccEBaaaa.o(.text+0x54e):E:/testing/swt/Test.java:35: undefined
    reference to
    `org::eclipse::swt::widgets::Canvas::Canvas(org::eclipse::swt::widgets::Composite*,
    int)'
    C:\temp/ccEBaaaa.o(.text+0x59f):E:/testing/swt/Test.java:41: undefined
    reference to `org::eclipse::swt::graphics::GC::class$'
    C:\temp/ccEBaaaa.o(.text+0x5b5):E:/testing/swt/Test.java:41: undefined
    reference to
    `org::eclipse::swt::graphics::GC::GC(org::eclipse::swt::graphics::Drawable*)'
    C:\temp/ccEBaaaa.o(.text+0x5f6):E:/testing/swt/Test.java:42: undefined
    reference to `org::eclipse::swt::graphics::GC::drawOval(int, int, int, int)'
    C:\temp/ccEBaaaa.o(.text+0x612):E:/testing/swt/Test.java:43: undefined
    reference to `org::eclipse::swt::graphics::GC::dispose()'
    C:\temp/ccEBaaaa.o(.data+0x134): In function
    `ZN6Test$114widgetSelectedEPN3org7eclipse3swt6events14SelectionEventE':
    E:/testing/swt/Test.java:50: undefined reference to
    `org::eclipse::swt::widgets::Label::class$'
    C:\temp/ccEBaaaa.o(.data+0x144):E:/testing/swt/Test.java:50: undefined
    reference to `org::eclipse::swt::widgets::Composite::class$'
    C:\temp/ccEBaaaa.o(.data+0x154):E:/testing/swt/Test.java:51: undefined
    reference to `org::eclipse::swt::widgets::Shell::class$'
    C:\temp/ccEBaaaa.o(.data+0x164):E:/testing/swt/Test.java:51: undefined
    reference to `org::eclipse::swt::widgets::Display::class$'
    C:\temp/ccEBaaaa.o(.data+0x204): In function
    `ZN4Test6centerEPN3org7eclipse3swt7widgets7DisplayEPNS3_5ShellE':
    E:/testing/swt/Test.java:14: undefined reference to
    `org::eclipse::swt::events::SelectionListener::class$'
    collect2: ld returned 1 exit status
    Patrix, Jul 4, 2005
    #1
    1. Advertising

  2. Patrix

    IchBin Guest

    Patrix wrote:
    > Hello,
    >
    > Did anyone succeed in compiling a SWT application with GCJ on Windows?
    > If yes, could you please give some help, I tried with different SWT and
    > GCJ versions, but I had no luck, or wasn't able to make them work.
    >
    > Here is the compile command:
    >
    > gcj --classpath=.;e:\swt\swt.jar -Le:\swt -lswt-win32-3064 --main=Test
    > -o Test Test.java
    >
    > Here are the errors:
    >
    > C:\temp/ccEBaaaa.o(.text+0x1fd): In function
    > `ZN4Test6centerEPN3org7eclipse3swt7widgets7DisplayEPNS3_5ShellE':
    > E:/testing/swt/Test.java:14: undefined reference to
    > `org::eclipse::swt::graphics::point::class$'
    > C:\temp/ccEBaaaa.o(.text+0x29e):E:/testing/swt/Test.java:14: undefined
    > reference to `org::eclipse::swt::graphics::point::point(int, int)'
    > C:\temp/ccEBaaaa.o(.text+0x2f8): In function
    > `ZN4Test4mainEP6JArrayIPN4java4lang6StringEE':
    > E:/testing/swt/Test.java:19: undefined reference to
    > `org::eclipse::swt::widgets::Display::class$'
    > C:\temp/ccEBaaaa.o(.text+0x307):E:/testing/swt/Test.java:19: undefined
    > reference to `org::eclipse::swt::widgets::Display::Display()'
    > C:\temp/ccEBaaaa.o(.text+0x31b):E:/testing/swt/Test.java:20: undefined
    > reference to `org::eclipse::swt::widgets::Shell::class$'
    > C:\temp/ccEBaaaa.o(.text+0x339):E:/testing/swt/Test.java:20: undefined
    > reference to
    > `org::eclipse::swt::widgets::Shell::Shell(org::eclipse::swt::widgets::Display*,
    > int)'
    > C:\temp/ccEBaaaa.o(.text+0x388):E:/testing/swt/Test.java:24: undefined
    > reference to `org::eclipse::swt::layout::FillLayout::class$'
    > C:\temp/ccEBaaaa.o(.text+0x39f):E:/testing/swt/Test.java:24: undefined
    > reference to `org::eclipse::swt::layout::FillLayout::FillLayout(int)'
    > C:\temp/ccEBaaaa.o(.text+0x3dd):E:/testing/swt/Test.java:26: undefined
    > reference to `org::eclipse::swt::widgets::Composite::class$'
    > C:\temp/ccEBaaaa.o(.text+0x3fb):E:/testing/swt/Test.java:26: undefined
    > reference to
    > `org::eclipse::swt::widgets::Composite::Composite(org::eclipse::swt::widgets::Composite*,
    > int)'
    > C:\temp/ccEBaaaa.o(.text+0x415):E:/testing/swt/Test.java:27: undefined
    > reference to `org::eclipse::swt::layout::RowLayout::class$'
    > C:\temp/ccEBaaaa.o(.text+0x424):E:/testing/swt/Test.java:27: undefined
    > reference to `org::eclipse::swt::layout::RowLayout::RowLayout()'
    > C:\temp/ccEBaaaa.o(.text+0x462):E:/testing/swt/Test.java:29: undefined
    > reference to `org::eclipse::swt::widgets::Label::class$'
    > C:\temp/ccEBaaaa.o(.text+0x480):E:/testing/swt/Test.java:29: undefined
    > reference to
    > `org::eclipse::swt::widgets::Label::Label(org::eclipse::swt::widgets::Composite*,
    > int)'
    > C:\temp/ccEBaaaa.o(.text+0x4c9):E:/testing/swt/Test.java:32: undefined
    > reference to `org::eclipse::swt::widgets::Button::class$'
    > C:\temp/ccEBaaaa.o(.text+0x4e7):E:/testing/swt/Test.java:32: undefined
    > reference to
    > `org::eclipse::swt::widgets::Button::Button(org::eclipse::swt::widgets::Composite*,
    > int)'
    > C:\temp/ccEBaaaa.o(.text+0x530):E:/testing/swt/Test.java:35: undefined
    > reference to `org::eclipse::swt::widgets::Canvas::class$'
    > C:\temp/ccEBaaaa.o(.text+0x54e):E:/testing/swt/Test.java:35: undefined
    > reference to
    > `org::eclipse::swt::widgets::Canvas::Canvas(org::eclipse::swt::widgets::Composite*,
    > int)'
    > C:\temp/ccEBaaaa.o(.text+0x59f):E:/testing/swt/Test.java:41: undefined
    > reference to `org::eclipse::swt::graphics::GC::class$'
    > C:\temp/ccEBaaaa.o(.text+0x5b5):E:/testing/swt/Test.java:41: undefined
    > reference to
    > `org::eclipse::swt::graphics::GC::GC(org::eclipse::swt::graphics::Drawable*)'
    >
    > C:\temp/ccEBaaaa.o(.text+0x5f6):E:/testing/swt/Test.java:42: undefined
    > reference to `org::eclipse::swt::graphics::GC::drawOval(int, int, int,
    > int)'
    > C:\temp/ccEBaaaa.o(.text+0x612):E:/testing/swt/Test.java:43: undefined
    > reference to `org::eclipse::swt::graphics::GC::dispose()'
    > C:\temp/ccEBaaaa.o(.data+0x134): In function
    > `ZN6Test$114widgetSelectedEPN3org7eclipse3swt6events14SelectionEventE':
    > E:/testing/swt/Test.java:50: undefined reference to
    > `org::eclipse::swt::widgets::Label::class$'
    > C:\temp/ccEBaaaa.o(.data+0x144):E:/testing/swt/Test.java:50: undefined
    > reference to `org::eclipse::swt::widgets::Composite::class$'
    > C:\temp/ccEBaaaa.o(.data+0x154):E:/testing/swt/Test.java:51: undefined
    > reference to `org::eclipse::swt::widgets::Shell::class$'
    > C:\temp/ccEBaaaa.o(.data+0x164):E:/testing/swt/Test.java:51: undefined
    > reference to `org::eclipse::swt::widgets::Display::class$'
    > C:\temp/ccEBaaaa.o(.data+0x204): In function
    > `ZN4Test6centerEPN3org7eclipse3swt7widgets7DisplayEPNS3_5ShellE':
    > E:/testing/swt/Test.java:14: undefined reference to
    > `org::eclipse::swt::events::SelectionListener::class$'
    > collect2: ld returned 1 exit status


    You will do better asking this question in the Eclipse newsgroups at
    news.eclipse.org

    Like eclipse.platform.swt

    --


    Thanks in Advance...
    IchBin, Pocono Lake, Pa, USA
    __________________________________________________________________________

    ' If there is one, Knowledge is the "Fountain of Youth"'
    -William E. Taylor, Regular Guy (1952-)
    IchBin, Jul 4, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. g
    Replies:
    6
    Views:
    317
    S.A. Samokhodkin
    Aug 26, 2003
  2. KevJohnP

    GCJ Problem

    KevJohnP, Oct 31, 2003, in forum: Java
    Replies:
    0
    Views:
    604
    KevJohnP
    Oct 31, 2003
  3. John
    Replies:
    0
    Views:
    391
  4. Mike Mike

    How to compile these code by gcj?

    Mike Mike, Jun 2, 2004, in forum: Java
    Replies:
    1
    Views:
    491
  5. Ramon F Herrera

    Where can I download SWT? (SWT homepage)

    Ramon F Herrera, Dec 5, 2007, in forum: Java
    Replies:
    11
    Views:
    4,033
    Ramon F Herrera
    Dec 6, 2007
Loading...

Share This Page