Thread: [Java-gnome-developer] Compiling java-gnome applications with GCJ
Brought to you by:
afcowie
From: <a_t...@ma...> - 2007-04-11 11:33:07
|
Hello. I want to compile java-gnome application with GCJ. Is it possible? What gcj options should I use? |
From: Andrew C. <ca...@re...> - 2007-04-19 18:05:04
|
Yes, frysk, for instance, builds using GCJ; the exact options you need depends on your application and the libraries you are using. The easiest way is: gcj --main=<your-main-class> foo.jar which will compile foo.jar down to a native java binary. Andrew Алексей Титов wrote: > Hello. I want to compile java-gnome application with GCJ. Is it possible? What gcj options should I use? > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > |
From: Alexey T. <a_t...@ma...> - 2007-04-20 19:42:35
|
> Yes, > > frysk, for instance, builds using GCJ; the exact options you need > depends on your application and the libraries you are using. The > easiest way is: > > gcj --main=<your-main-class> foo.jar > > which will compile foo.jar down to a native java binary. > > Andrew > Thank you for answer... But I do something wrong, perhaps... I created a jar containing my class files (app.jar). I can run it: java -Djava.library.path=/usr/lib -jar ./app.jar But when I try to compile it with gcj: LANG=C; gcj --main=test.Main app.jar --CLASSPATH=:/usr/share/java/gtk2.8.jar:/usr/share/java/gnome2.12.jar:/usr/share/java/glib0.2.jar:/usr/share/java/cairo1.0.jar -Djava.library.path=/usr/lib the following error produces: /tmp/ccSczgo2.o: In function `bool test::Main $1::lifeCycleQuery(org::gnu::gtk::event::LifeCycleEvent*)': app.jar:(.text+0x41): undefined reference to `void org::gnu::gtk::Gtk::mainQuit()' /tmp/ccSczgo2.o: In function `void test::Main $2::buttonEvent(org::gnu::gtk::event::ButtonEvent*)': app.jar:(.text+0xab): undefined reference to `org::gnu::gtk::event::ButtonEvent$Type::class$' app.jar:(.text+0xb5): undefined reference to `org::gnu::gtk::event::ButtonEvent$Type::RELEASE' app.jar:(.text+0xe0): undefined reference to `void org::gnu::gtk::Gtk::mainQuit()' /tmp/ccSczgo2.o: In function `void test::Main $3::buttonEvent(org::gnu::gtk::event::ButtonEvent*)': app.jar:(.text+0x16b): undefined reference to `org::gnu::gtk::event::ButtonEvent$Type::class$' app.jar:(.text+0x175): undefined reference to `org::gnu::gtk::event::ButtonEvent$Type::RELEASE' app.jar:(.text+0x1aa): undefined reference to `org::gnu::gtk::DataRow::class$' app.jar:(.text+0x1c9): undefined reference to `org::gnu::gtk::DataRow::DataRow()' /tmp/ccSczgo2.o: In function `test::Main::Main()': app.jar:(.text+0x2bf): undefined reference to `org::gnu::gtk::Window::class$' app.jar:(.text+0x2ef): undefined reference to `org::gnu::gtk::WindowType::class$' app.jar:(.text+0x2f9): undefined reference to `org::gnu::gtk::WindowType::TOPLEVEL' app.jar:(.text+0x323): undefined reference to `org::gnu::gtk::Window::Window(org::gnu::gtk::WindowType*)' app.jar:(.text+0x34e): undefined reference to `org::gnu::gtk::Button::class$' app.jar:(.text+0x383): undefined reference to `org::gnu::gtk::GtkStockItem::class$' app.jar:(.text+0x394): undefined reference to `org::gnu::gtk::GtkStockItem::SAVE' app.jar:(.text+0x3be): undefined reference to `org::gnu::gtk::Button::Button(org::gnu::gtk::GtkStockItem*)' app.jar:(.text+0x3e9): undefined reference to `org::gnu::gtk::Button::class$' app.jar:(.text+0x41e): undefined reference to `org::gnu::gtk::GtkStockItem::class$' app.jar:(.text+0x428): undefined reference to `org::gnu::gtk::GtkStockItem::CDROM' app.jar:(.text+0x452): undefined reference to `org::gnu::gtk::Button::Button(org::gnu::gtk::GtkStockItem*)' app.jar:(.text+0x5ba): undefined reference to `org::gnu::gtk::DataRow::class$' app.jar:(.text+0x5eb): undefined reference to `org::gnu::gtk::DataRow::DataRow()' app.jar:(.text+0x5fe): undefined reference to `org::gnu::gtk::ListStore::class$' app.jar:(.text+0x63b): undefined reference to `org::gnu::gtk::DataColumn::class$' app.jar:(.text+0x673): undefined reference to `org::gnu::gtk::DataColumnString::class$' app.jar:(.text+0x692): undefined reference to `org::gnu::gtk::DataColumnString::DataColumnString()' app.jar:(.text+0x70b): undefined reference to `org::gnu::gtk::ListStore::ListStore(JArray<org::gnu::gtk::DataColumn*>*)' app.jar:(.text+0x80a): undefined reference to `org::gnu::gtk::ComboBox::class$' app.jar:(.text+0x83b): undefined reference to `org::gnu::gtk::ComboBox::ComboBox()' app.jar:(.text+0x848): undefined reference to `org::gnu::gdk::Pixbuf::class$' app.jar:(.text+0x88e): undefined reference to `org::gnu::gdk::Pixbuf::Pixbuf(java::lang::String*)' app.jar:(.text+0x8e4): undefined reference to `org::gnu::gtk::Image::class$' app.jar:(.text+0x931): undefined reference to `org::gnu::gtk::Image::Image(org::gnu::gdk::Pixbuf*)' app.jar:(.text+0x9f5): undefined reference to `org::gnu::gtk::HBox::class$' app.jar:(.text+0xa43): undefined reference to `org::gnu::gtk::HBox::HBox(bool, int)' /tmp/ccSczgo2.o: In function `void test::Main::main(JArray<java::lang::String*>*)': app.jar:(.text+0xc87): undefined reference to `void org::gnu::gtk::Gtk::init(JArray<java::lang::String*>*)' app.jar:(.text+0xca6): undefined reference to `void org::gnu::gtk::Gtk::main()' /tmp/ccSczgo2.o: In function `test::MyWidget::MyWidget()': app.jar:(.text+0xcc6): undefined reference to `org::gnu::gtk::DrawingArea::DrawingArea()' /tmp/ccSczgo2.o: In function `bool test::MyWidget::exposeEvent(org::gnu::gtk::event::ExposeEvent*)': app.jar:(.text+0xd09): undefined reference to `org::gnu::gdk::GdkCairo::class$' app.jar:(.text+0xd51): undefined reference to `org::gnu::gdk::GdkCairo::GdkCairo(org::gnu::gdk::Drawable*)' /tmp/ccSczgo2.o: In function `void test::MyWidget::draw(org::gnu::gdk::GdkCairo*)': app.jar:(.text+0xe9f): undefined reference to `org::freedesktop::cairo::Rectangle::class$' app.jar:(.text+0xef5): undefined reference to `int org::gnu::gtk::Allocation::getWidth()' app.jar:(.text+0xf30): undefined reference to `int org::gnu::gtk::Allocation::getHeight()' app.jar:(.text+0xf66): undefined reference to `org::freedesktop::cairo::Rectangle::Rectangle(double, double, double, double)' app.jar:(.text+0xf9b): undefined reference to `org::freedesktop::cairo::Pattern::class$' app.jar:(.text+0xfea): undefined reference to `org::freedesktop::cairo::Pattern::Pattern(double, double, double)' app.jar:(.text+0x116f): undefined reference to `org::freedesktop::cairo::Rectangle::class$' app.jar:(.text+0x11c5): undefined reference to `int org::gnu::gtk::Allocation::getWidth()' app.jar:(.text+0x1200): undefined reference to `int org::gnu::gtk::Allocation::getHeight()' app.jar:(.text+0x1236): undefined reference to `org::freedesktop::cairo::Rectangle::Rectangle(double, double, double, double)' app.jar:(.text+0x126b): undefined reference to `org::freedesktop::cairo::Pattern::class$' app.jar:(.text+0x12ba): undefined reference to `org::freedesktop::cairo::Pattern::Pattern(double, double, double)' /tmp/ccSczgo2.o:(.data+0x7c): undefined reference to `org::gnu::gtk::event::LifeCycleListener::class$' /tmp/ccSczgo2.o:(.data+0x1a8): undefined reference to `org::gnu::gtk::event::ButtonListener::class$' /tmp/ccSczgo2.o:(.data+0x2d4): undefined reference to `org::gnu::gtk::ListStore::class$' /tmp/ccSczgo2.o:(.data+0x308): undefined reference to `org::gnu::gtk::event::ButtonListener::class$' /tmp/ccSczgo2.o:(.data+0x424): undefined reference to `org::gnu::gtk::Window::class$' /tmp/ccSczgo2.o:(.data+0x434): undefined reference to `org::gnu::gtk::Button::class$' /tmp/ccSczgo2.o:(.data+0x444): undefined reference to `org::gnu::gtk::Button::class$' /tmp/ccSczgo2.o:(.data+0x590): undefined reference to `void org::gnu::glib::GObject::finalize()' /tmp/ccSczgo2.o:(.data+0x594): undefined reference to `int org::gnu::glib::Struct::hashCode()' /tmp/ccSczgo2.o:(.data+0x598): undefined reference to `bool org::gnu::glib::Struct::equals(java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5a8): undefined reference to `org::gnu::glib::Handle* org::gnu::glib::Struct::getHandle()' /tmp/ccSczgo2.o:(.data+0x5ac): undefined reference to `void org::gnu::glib::Struct::setHandle(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x5b0): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::String*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5b4): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5b8): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::Object*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5bc): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::String*, java::lang::Object*, bool)' /tmp/ccSczgo2.o:(.data+0x5c0): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::String*, java::lang::Object*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5c4): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::String*, java::lang::Class*)' /tmp/ccSczgo2.o:(.data+0x5c8): undefined reference to `int org::gnu::glib::GObject::addEventHandler(java::lang::String*, java::lang::String*, java::lang::Class*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5cc): undefined reference to `void org::gnu::glib::GObject::removeEventHandler(int)' /tmp/ccSczgo2.o:(.data+0x5d0): undefined reference to `java::lang::Object* org::gnu::glib::GObject::getData(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x5d4): undefined reference to `void org::gnu::glib::GObject::setData(java::lang::String*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x5d8): undefined reference to `java::lang::Class* org::gnu::gtk::Widget::getEventListenerClass(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x5dc): undefined reference to `org::gnu::glib::EventType* org::gnu::gtk::Widget::getEventType(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x5e0): undefined reference to `void org::gnu::glib::GObject::setProperty(java::lang::String*, org::gnu::glib::Value*)' /tmp/ccSczgo2.o:(.data+0x5e4): undefined reference to `void org::gnu::glib::GObject::setIntProperty(java::lang::String*, int)' /tmp/ccSczgo2.o:(.data+0x5e8): undefined reference to `void org::gnu::glib::GObject::setStringProperty(java::lang::String*, java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x5ec): undefined reference to `void org::gnu::glib::GObject::setBooleanProperty(java::lang::String*, bool)' /tmp/ccSczgo2.o:(.data+0x5f0): undefined reference to `void org::gnu::glib::GObject::setFloatProperty(java::lang::String*, float)' /tmp/ccSczgo2.o:(.data+0x5f4): undefined reference to `void org::gnu::glib::GObject::setLongProperty(java::lang::String*, long long)' /tmp/ccSczgo2.o:(.data+0x5f8): undefined reference to `void org::gnu::glib::GObject::setDoubleProperty(java::lang::String*, double)' /tmp/ccSczgo2.o:(.data+0x5fc): undefined reference to `void org::gnu::glib::GObject::setPixbufProperty(java::lang::String*, org::gnu::gdk::Pixbuf*)' /tmp/ccSczgo2.o:(.data+0x600): undefined reference to `void org::gnu::glib::GObject::setJavaObjectProperty(java::lang::String*, java::lang::Object*)' /tmp/ccSczgo2.o:(.data+0x604): undefined reference to `org::gnu::glib::Value* org::gnu::glib::GObject::getProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x608): undefined reference to `int org::gnu::glib::GObject::getIntProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x60c): undefined reference to `java::lang::String* org::gnu::glib::GObject::getStringProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x610): undefined reference to `bool org::gnu::glib::GObject::getBooleanProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x614): undefined reference to `float org::gnu::glib::GObject::getFloatProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x618): undefined reference to `long long org::gnu::glib::GObject::getLongProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x61c): undefined reference to `double org::gnu::glib::GObject::getDoubleProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x620): undefined reference to `org::gnu::gdk::Pixbuf* org::gnu::glib::GObject::getPixbufProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x624): undefined reference to `java::lang::Object* org::gnu::glib::GObject::getJavaObjectProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x628): undefined reference to `bool org::gnu::glib::GObject::hasProperty(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x62c): undefined reference to `void org::gnu::glib::GObject::addListener(org::gnu::glib::PropertyNotificationListener*)' /tmp/ccSczgo2.o:(.data+0x630): undefined reference to `void org::gnu::glib::GObject::removeListener(org::gnu::glib::PropertyNotificationListener*)' /tmp/ccSczgo2.o:(.data+0x634): undefined reference to `void org::gnu::glib::GObject::freezeNotify()' /tmp/ccSczgo2.o:(.data+0x638): undefined reference to `void org::gnu::glib::GObject::notify(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x63c): undefined reference to `void org::gnu::glib::GObject::thawNotify()' /tmp/ccSczgo2.o:(.data+0x640): undefined reference to `org::gnu::glib::GObject* org::gnu::glib::GObject::retrieveGObject(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x644): undefined reference to `void org::gnu::gtk::GtkObject::destroy()' /tmp/ccSczgo2.o:(.data+0x648): undefined reference to `void org::gnu::gtk::GtkObject::sink()' /tmp/ccSczgo2.o:(.data+0x64c): undefined reference to `void org::gnu::gtk::GtkObject::checkState()' /tmp/ccSczgo2.o:(.data+0x650): undefined reference to `void org::gnu::gtk::Widget::show()' /tmp/ccSczgo2.o:(.data+0x654): undefined reference to `void org::gnu::gtk::Widget::showAll()' /tmp/ccSczgo2.o:(.data+0x658): undefined reference to `void org::gnu::gtk::Widget::hide()' /tmp/ccSczgo2.o:(.data+0x65c): undefined reference to `void org::gnu::gtk::Widget::hideAll()' /tmp/ccSczgo2.o:(.data+0x660): undefined reference to `void org::gnu::gtk::Widget::realize()' /tmp/ccSczgo2.o:(.data+0x664): undefined reference to `void org::gnu::gtk::Widget::draw()' /tmp/ccSczgo2.o:(.data+0x668): undefined reference to `void org::gnu::gtk::Widget::drawArea(org::gnu::gdk::Rectangle*)' /tmp/ccSczgo2.o:(.data+0x66c): undefined reference to `void org::gnu::gtk::Widget::drawArea(int, int, int, int)' /tmp/ccSczgo2.o:(.data+0x670): undefined reference to `bool org::gnu::gtk::Widget::activate()' /tmp/ccSczgo2.o:(.data+0x674): undefined reference to `void org::gnu::gtk::Widget::reparent(org::gnu::gtk::Widget*)' /tmp/ccSczgo2.o:(.data+0x678): undefined reference to `org::gnu::gtk::Widget* org::gnu::gtk::Widget::getParent()' /tmp/ccSczgo2.o:(.data+0x67c): undefined reference to `org::gnu::gdk::Window* org::gnu::gtk::Widget::getParentWindow()' /tmp/ccSczgo2.o:(.data+0x680): undefined reference to `org::gnu::gdk::Window* org::gnu::gtk::Widget::getWindow()' /tmp/ccSczgo2.o:(.data+0x684): undefined reference to `void org::gnu::gtk::Widget::setEvents(org::gnu::gdk::EventMask*)' /tmp/ccSczgo2.o:(.data+0x688): undefined reference to `void org::gnu::gtk::Widget::addEvents(org::gnu::gdk::EventMask*)' /tmp/ccSczgo2.o:(.data+0x68c): undefined reference to `void org::gnu::gtk::Widget::setExtensionEvents(org::gnu::gdk::ExtensionMode*)' /tmp/ccSczgo2.o:(.data+0x690): undefined reference to `org::gnu::gdk::ExtensionMode* org::gnu::gtk::Widget::getExtensionEvents()' /tmp/ccSczgo2.o:(.data+0x694): undefined reference to `org::gnu::gdk::Rectangle* org::gnu::gtk::Widget::intersect(org::gnu::gdk::Rectangle*)' /tmp/ccSczgo2.o:(.data+0x698): undefined reference to `bool org::gnu::gtk::Widget::hasFocus()' /tmp/ccSczgo2.o:(.data+0x69c): undefined reference to `void org::gnu::gtk::Widget::grabFocus()' /tmp/ccSczgo2.o:(.data+0x6a0): undefined reference to `bool org::gnu::gtk::Widget::getCanFocus()' /tmp/ccSczgo2.o:(.data+0x6a4): undefined reference to `void org::gnu::gtk::Widget::setCanFocus(bool)' /tmp/ccSczgo2.o:(.data+0x6a8): undefined reference to `void org::gnu::gtk::Widget::grabDefault()' /tmp/ccSczgo2.o:(.data+0x6ac): undefined reference to `void org::gnu::gtk::Widget::setName(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x6b0): undefined reference to `java::lang::String* org::gnu::gtk::Widget::getName()' /tmp/ccSczgo2.o:(.data+0x6b4): undefined reference to `void org::gnu::gtk::Widget::setSensitive(bool)' /tmp/ccSczgo2.o:(.data+0x6b8): undefined reference to `bool org::gnu::gtk::Widget::getSensitive()' /tmp/ccSczgo2.o:(.data+0x6bc): undefined reference to `org::gnu::gtk::Widget* org::gnu::gtk::Widget::getToplevel()' /tmp/ccSczgo2.o:(.data+0x6c0): undefined reference to `org::gnu::gdk::Colormap* org::gnu::gtk::Widget::getColormap()' /tmp/ccSczgo2.o:(.data+0x6c4): undefined reference to `void org::gnu::gtk::Widget::setColormap(org::gnu::gdk::Colormap*)' /tmp/ccSczgo2.o:(.data+0x6c8): undefined reference to `org::gnu::gdk::Point* org::gnu::gtk::Widget::getPointer()' /tmp/ccSczgo2.o:(.data+0x6cc): undefined reference to `bool org::gnu::gtk::Widget::isAncestor(org::gnu::gtk::Widget*)' /tmp/ccSczgo2.o:(.data+0x6d0): undefined reference to `void org::gnu::gtk::Widget::pushColormap(org::gnu::gdk::Colormap*)' /tmp/ccSczgo2.o:(.data+0x6d4): undefined reference to `void org::gnu::gtk::Widget::popColormap()' /tmp/ccSczgo2.o:(.data+0x6d8): undefined reference to `void org::gnu::gtk::Widget::shapeCombineMask(org::gnu::gdk::Bitmap*, int, int)' /tmp/ccSczgo2.o:(.data+0x6dc): undefined reference to `void org::gnu::gtk::Widget::setForegroundColor(org::gnu::gtk::StateType*, org::gnu::gdk::Color*)' /tmp/ccSczgo2.o:(.data+0x6e0): undefined reference to `void org::gnu::gtk::Widget::setBackgroundColor(org::gnu::gtk::StateType*, org::gnu::gdk::Color*)' /tmp/ccSczgo2.o:(.data+0x6e4): undefined reference to `void org::gnu::gtk::Widget::setTextColor(org::gnu::gtk::StateType*, org::gnu::gdk::Color*)' /tmp/ccSczgo2.o:(.data+0x6e8): undefined reference to `void org::gnu::gtk::Widget::setBaseColor(org::gnu::gtk::StateType*, org::gnu::gdk::Color*)' /tmp/ccSczgo2.o:(.data+0x6ec): undefined reference to `void org::gnu::gtk::Widget::setFont(org::gnu::pango::FontDescription*)' /tmp/ccSczgo2.o:(.data+0x6f0): undefined reference to `void org::gnu::gtk::Widget::modifyStyle(org::gnu::gtk::RcStyle*)' /tmp/ccSczgo2.o:(.data+0x6f4): undefined reference to `org::gnu::gtk::RcStyle* org::gnu::gtk::Widget::getModifierStyle()' /tmp/ccSczgo2.o:(.data+0x6f8): undefined reference to `org::gnu::gtk::Style* org::gnu::gtk::Widget::getStyle()' /tmp/ccSczgo2.o:(.data+0x6fc): undefined reference to `org::gnu::pango::Context* org::gnu::gtk::Widget::createContext()' /tmp/ccSczgo2.o:(.data+0x700): undefined reference to `org::gnu::pango::Context* org::gnu::gtk::Widget::getContext()' /tmp/ccSczgo2.o:(.data+0x704): undefined reference to `org::gnu::pango::Layout* org::gnu::gtk::Widget::createLayout(java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x708): undefined reference to `void org::gnu::gtk::Widget::setDoubleBuffered(bool)' /tmp/ccSczgo2.o:(.data+0x70c): undefined reference to `org::gnu::atk::AtkObject* org::gnu::gtk::Widget::getAccessible()' /tmp/ccSczgo2.o:(.data+0x710): undefined reference to `bool org::gnu::gtk::Widget::canActivateAccel(int)' /tmp/ccSczgo2.o:(.data+0x714): undefined reference to `org::gnu::gdk::Screen* org::gnu::gtk::Widget::getScreen()' /tmp/ccSczgo2.o:(.data+0x718): undefined reference to `bool org::gnu::gtk::Widget::hasScreen()' /tmp/ccSczgo2.o:(.data+0x71c): undefined reference to `org::gnu::gdk::Display* org::gnu::gtk::Widget::getDisplay()' /tmp/ccSczgo2.o:(.data+0x720): undefined reference to `org::gnu::gdk::Window* org::gnu::gtk::Widget::getRootWindow()' /tmp/ccSczgo2.o:(.data+0x724): undefined reference to `void org::gnu::gtk::Widget::addAccelerator(org::gnu::gtk::AccelGroup*, int, org::gnu::gdk::ModifierType*, org::gnu::gtk::AccelFlags*)' /tmp/ccSczgo2.o:(.data+0x728): undefined reference to `bool org::gnu::gtk::Widget::removeAccelerator(org::gnu::gtk::AccelGroup*, int, org::gnu::gdk::ModifierType*)' /tmp/ccSczgo2.o:(.data+0x72c): undefined reference to `void org::gnu::gtk::Widget::setMinimumSize(int, int)' /tmp/ccSczgo2.o:(.data+0x730): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::LifeCycleListener*)' /tmp/ccSczgo2.o:(.data+0x734): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::LifeCycleListener*)' /tmp/ccSczgo2.o:(.data+0x738): undefined reference to `void org::gnu::gtk::Widget::fireLifeCycleEvent(org::gnu::gtk::event::LifeCycleEvent*)' /tmp/ccSczgo2.o:(.data+0x73c): undefined reference to `bool org::gnu::gtk::Widget::fireBooleanLifeCycleEvent(org::gnu::gtk::event::LifeCycleEvent*, bool)' /tmp/ccSczgo2.o:(.data+0x740): undefined reference to `void org::gnu::gtk::Widget::handleShow()' /tmp/ccSczgo2.o:(.data+0x744): undefined reference to `void org::gnu::gtk::Widget::handleHide()' /tmp/ccSczgo2.o:(.data+0x748): undefined reference to `void org::gnu::gtk::Widget::handleRealize()' /tmp/ccSczgo2.o:(.data+0x74c): undefined reference to `void org::gnu::gtk::Widget::handleUnrealize()' /tmp/ccSczgo2.o:(.data+0x750): undefined reference to `bool org::gnu::gtk::Widget::handleDestroy(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x754): undefined reference to `bool org::gnu::gtk::Widget::handleDelete(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x758): undefined reference to `void org::gnu::gtk::Widget::handleMap()' /tmp/ccSczgo2.o:(.data+0x75c): undefined reference to `void org::gnu::gtk::Widget::handleUnmap()' /tmp/ccSczgo2.o:(.data+0x760): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::FocusListener*)' /tmp/ccSczgo2.o:(.data+0x764): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::FocusListener*)' /tmp/ccSczgo2.o:(.data+0x768): undefined reference to `bool org::gnu::gtk::Widget::fireFocusEvent(org::gnu::gtk::event::FocusEvent*)' /tmp/ccSczgo2.o:(.data+0x76c): undefined reference to `bool org::gnu::gtk::Widget::handleFocusIn(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x770): undefined reference to `bool org::gnu::gtk::Widget::handleFocusOut(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x774): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::ConfigureListener*)' /tmp/ccSczgo2.o:(.data+0x778): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::ConfigureListener*)' /tmp/ccSczgo2.o:(.data+0x77c): undefined reference to `bool org::gnu::gtk::Widget::fireConfigureEvent(org::gnu::gtk::event::ConfigureEvent*)' /tmp/ccSczgo2.o:(.data+0x780): undefined reference to `bool org::gnu::gtk::Widget::handleConfigure(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x784): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::KeyListener*)' /tmp/ccSczgo2.o:(.data+0x788): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::KeyListener*)' /tmp/ccSczgo2.o:(.data+0x78c): undefined reference to `bool org::gnu::gtk::Widget::fireKeyEvent(org::gnu::gtk::event::KeyEvent*)' /tmp/ccSczgo2.o:(.data+0x790): undefined reference to `bool org::gnu::gtk::Widget::handleKeyPressed(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x794): undefined reference to `bool org::gnu::gtk::Widget::handleKeyReleased(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x798): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::MouseListener*)' /tmp/ccSczgo2.o:(.data+0x79c): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::MouseListener*)' /tmp/ccSczgo2.o:(.data+0x7a0): undefined reference to `bool org::gnu::gtk::Widget::fireMouseEvent(org::gnu::gtk::event::MouseEvent*)' /tmp/ccSczgo2.o:(.data+0x7a4): undefined reference to `bool org::gnu::gtk::Widget::handleButtonPressed(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x7a8): undefined reference to `bool org::gnu::gtk::Widget::handleButtonReleased(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x7ac): undefined reference to `bool org::gnu::gtk::Widget::handleScroll(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x7b0): undefined reference to `bool org::gnu::gtk::Widget::handleMouseEnter(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x7b4): undefined reference to `bool org::gnu::gtk::Widget::handleMouseLeave(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x7b8): undefined reference to `org::gnu::gtk::Allocation* org::gnu::gtk::Widget::getAllocation()' /tmp/ccSczgo2.o:(.data+0x7bc): undefined reference to `void org::gnu::gtk::Widget::setDragSource(org::gnu::gdk::ModifierType*, JArray<org::gnu::gtk::TargetEntry*>*, org::gnu::gdk::DragAction*)' /tmp/ccSczgo2.o:(.data+0x7c0): undefined reference to `void org::gnu::gtk::Widget::setNoDragSource()' /tmp/ccSczgo2.o:(.data+0x7c4): undefined reference to `void org::gnu::gtk::Widget::setDragIcon(org::gnu::gtk::Widget*, org::gnu::gdk::Colormap*, org::gnu::gdk::Pixmap*, org::gnu::gdk::Bitmap*)' /tmp/ccSczgo2.o:(.data+0x7c8): undefined reference to `void org::gnu::gtk::Widget::setDragIconPixbuf(org::gnu::gtk::Widget*, org::gnu::gdk::Pixbuf*)' /tmp/ccSczgo2.o:(.data+0x7cc): undefined reference to `void org::gnu::gtk::Widget::setDragIconStock(org::gnu::gtk::Widget*, java::lang::String*)' /tmp/ccSczgo2.o:(.data+0x7d0): undefined reference to `void org::gnu::gtk::Widget::setDragDestination(org::gnu::gtk::DestDefaults*, JArray<org::gnu::gtk::TargetEntry*>*, org::gnu::gdk::DragAction*)' /tmp/ccSczgo2.o:(.data+0x7d4): undefined reference to `void org::gnu::gtk::Widget::getDragData(org::gnu::gdk::DragContext*, org::gnu::gdk::Atom*, int)' /tmp/ccSczgo2.o:(.data+0x7d8): undefined reference to `void org::gnu::gtk::Widget::setNoDragDestination()' /tmp/ccSczgo2.o:(.data+0x7dc): undefined reference to `void org::gnu::gtk::Widget::highlight()' /tmp/ccSczgo2.o:(.data+0x7e0): undefined reference to `void org::gnu::gtk::Widget::unHighlight()' /tmp/ccSczgo2.o:(.data+0x7e4): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::DragDestinationListener*)' /tmp/ccSczgo2.o:(.data+0x7e8): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::DragTargetListener*)' /tmp/ccSczgo2.o:(.data+0x7ec): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::DragDestinationListener*)' /tmp/ccSczgo2.o:(.data+0x7f0): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::DragTargetListener*)' /tmp/ccSczgo2.o:(.data+0x7f4): undefined reference to `void org::gnu::gtk::Widget::fireReceiveDragDataEvent(org::gnu::gtk::event::ReceiveDragDataEvent*)' /tmp/ccSczgo2.o:(.data+0x7f8): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::DragSourceListener*)' /tmp/ccSczgo2.o:(.data+0x7fc): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::DragOriginListener*)' /tmp/ccSczgo2.o:(.data+0x800): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::DragSourceListener*)' /tmp/ccSczgo2.o:(.data+0x804): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::DragOriginListener*)' /tmp/ccSczgo2.o:(.data+0x808): undefined reference to `void org::gnu::gtk::Widget::fireStartDragEvent(org::gnu::gtk::event::StartDragEvent*)' /tmp/ccSczgo2.o:(.data+0x80c): undefined reference to `bool org::gnu::gtk::Widget::fireDragMotionEvent(org::gnu::gtk::event::DragMotionEvent*)' /tmp/ccSczgo2.o:(.data+0x810): undefined reference to `void org::gnu::gtk::Widget::fireLeaveDragDestinationEvent(org::gnu::gtk::event::LeaveDragDestinationEvent*)' /tmp/ccSczgo2.o:(.data+0x814): undefined reference to `void org::gnu::gtk::Widget::fireDeleteDragDataEvent(org::gnu::gtk::event::DeleteDragDataEvent*)' /tmp/ccSczgo2.o:(.data+0x818): undefined reference to `bool org::gnu::gtk::Widget::fireDropDragEvent(org::gnu::gtk::event::DropDragEvent*)' /tmp/ccSczgo2.o:(.data+0x81c): undefined reference to `void org::gnu::gtk::Widget::fireEndDragEvent(org::gnu::gtk::event::EndDragEvent*)' /tmp/ccSczgo2.o:(.data+0x820): undefined reference to `void org::gnu::gtk::Widget::fireRequestDragDataEvent(org::gnu::gtk::event::RequestDragDataEvent*)' /tmp/ccSczgo2.o:(.data+0x824): undefined reference to `void org::gnu::gtk::Widget::handleDragStarted(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x828): undefined reference to `void org::gnu::gtk::Widget::handleDragDataDeleted(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x82c): undefined reference to `bool org::gnu::gtk::Widget::handleDragDropped(org::gnu::glib::Handle*, int, int, int)' /tmp/ccSczgo2.o:(.data+0x830): undefined reference to `void org::gnu::gtk::Widget::handleDragEnded(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x834): undefined reference to `void org::gnu::gtk::Widget::handleDragDataReceived(org::gnu::glib::Handle*, int, int, org::gnu::glib::Handle*, int, int)' /tmp/ccSczgo2.o:(.data+0x838): undefined reference to `void org::gnu::gtk::Widget::handleDragDestinationLeft(org::gnu::glib::Handle*, int)' /tmp/ccSczgo2.o:(.data+0x83c): undefined reference to `bool org::gnu::gtk::Widget::handleDragMotionOccurred(org::gnu::glib::Handle*, int, int, int)' /tmp/ccSczgo2.o:(.data+0x840): undefined reference to `void org::gnu::gtk::Widget::handleDragDataRequested(org::gnu::glib::Handle*, org::gnu::glib::Handle*, int, int)' /tmp/ccSczgo2.o:(.data+0x844): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::ExposeListener*)' /tmp/ccSczgo2.o:(.data+0x848): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::ExposeListener*)' /tmp/ccSczgo2.o:(.data+0x84c): undefined reference to `bool org::gnu::gtk::Widget::fireExposeEvent(org::gnu::gtk::event::ExposeEvent*)' /tmp/ccSczgo2.o:(.data+0x850): undefined reference to `bool org::gnu::gtk::Widget::handleExpose(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x854): undefined reference to `bool org::gnu::gtk::Widget::handleNoExpose(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x858): undefined reference to `void org::gnu::gtk::Widget::addListener(org::gnu::gtk::event::MouseMotionListener*)' /tmp/ccSczgo2.o:(.data+0x85c): undefined reference to `void org::gnu::gtk::Widget::removeListener(org::gnu::gtk::event::MouseMotionListener*)' /tmp/ccSczgo2.o:(.data+0x860): undefined reference to `bool org::gnu::gtk::Widget::fireMouseMotionEvent(org::gnu::gtk::event::MouseMotionEvent*)' /tmp/ccSczgo2.o:(.data+0x864): undefined reference to `bool org::gnu::gtk::Widget::handleMouseMotion(org::gnu::glib::Handle*)' /tmp/ccSczgo2.o:(.data+0x8bc): undefined reference to `org::gnu::gtk::event::ExposeListener::class$' /tmp/ccSczgo2.o:(.data+0x8f0): undefined reference to `org::gnu::gtk::DrawingArea::class$' collect2: ld returned 1 exit status What is wrong? |
From: Yaakov (C. Ports) <yse...@us...> - 2007-04-20 20:50:29
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Alexey Titov wrote: > But when I try to compile it with gcj: > > LANG=C; gcj --main=test.Main app.jar > --CLASSPATH=:/usr/share/java/gtk2.8.jar:/usr/share/java/gnome2.12.jar:/usr/share/java/glib0.2.jar:/usr/share/java/cairo1.0.jar -Djava.library.path=/usr/lib You need to add '-fjni' to your LDFLAGS; see gcj(1) or "info gcj Invoking Code" for details. Yaakov Cygwin Ports -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGKScApiWmPGlmQSMRCNEOAKDCsChnVgpUZpPWrVvFvXWaWy/LiwCeKXcy fdlI7sY+TNhwxqoFz4WH7w4= =v4Ws -----END PGP SIGNATURE----- |
From: Andrew C. <an...@op...> - 2007-04-22 02:29:05
|
On Fri, 2007-04-20 at 15:48 -0500, Yaakov (Cygwin Ports) wrote:=20 > You need to add '-fjni' to your LDFLAGS Hm. Actually, I don't think so. We really only use GCJ for debugging, but you don't need to compile an application with -fjni if that app just _links_ against a [Java] library (AOT compiled .so). Certainly when we build the java-gnome *library* (which is what actually makes the JNI calls) _it_ we have to have -fjni on the gcj command line, but to build any old program, we just do: $ gcj -lgtkjava-4.0 --main=3DCricketScores -o cricket CricketScores.java $ ./cricket The command we use to build the Experiment class that ships in tests/prototype/ is similar: $ make $ gcj -g -Wl,-rpath=3Dtmp/ -Ltmp -lgtkjava-4.0 -Djava.library.path=3Dtmp/ -classpath tmp/gtk-4.0.jar --main=3DExperiment -o experiment tests/prototype/Experiment.java $ ./experiment with all that extra noise just being what you have to do to deal with linking against the still-in-place version of the compiled library, rather than that which has been installed somewhere more sensible. AfC Sydney |
From: Alexey T. <a_t...@ma...> - 2007-04-22 08:44:46
|
> Hm. Actually, I don't think so. > > We really only use GCJ for debugging, but you don't need to compile an > application with -fjni if that app just _links_ against a [Java] library > (AOT compiled .so). > > Certainly when we build the java-gnome *library* (which is what actually > makes the JNI calls) _it_ we have to have -fjni on the gcj command line, > but to build any old program, we just do: > > $ gcj -lgtkjava-4.0 --main=CricketScores -o cricket CricketScores.java > $ ./cricket > > The command we use to build the Experiment class that ships in > tests/prototype/ is similar: > > $ make > $ gcj -g -Wl,-rpath=tmp/ -Ltmp -lgtkjava-4.0 -Djava.library.path=tmp/ > -classpath tmp/gtk-4.0.jar --main=Experiment -o experiment > tests/prototype/Experiment.java > $ ./experiment > > with all that extra noise just being what you have to do to deal with > linking against the still-in-place version of the compiled library, > rather than that which has been installed somewhere more sensible. > > AfC > Sydney > Yes! It works. LANG=C; gcj -lcairojava -lgladejava -lglibjava -lgnomejava -lgtkjava --main=test.Main app.jar --CLASSPATH=:/usr/share/java/gtk2.8.jar:/usr/share/java/gnome2.12.jar:/usr/share/java/glib0.2.jar:/usr/share/java/cairo1.0.jar -Djava.library.path=/usr/lib Thank you. |