From: SourceForge.net <no...@so...> - 2005-06-29 20:23:55
|
Bugs item #1229226, was opened at 2005-06-29 06:40 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1229226&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MinGW Group: None Status: Open Resolution: None Priority: 5 Submitted By: Lubo Doleel (lubosdolezel) Assigned to: Danny Smith (dannysmith) Summary: Internal compiler error with gtkmm/treeviewcolumn.h Initial Comment: Hello, I am trying to use GTKmm in a closed-source cross-platform application. Failure No 1: MainWindow.cc: variable 'VTT for Gtk::TreeViewColumn' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. In order to avoid auto-import failed message with TreeViewColumn, I've edited gtkmm's treeviewcolumn.h: class TreeViewColumn : public Gtk::Object -to- class __declspec(dllimport) TreeViewColumn : public Gtk::Object But now I get internal compiler error: /opt/xmingw/i386-mingw32msvc/include/gtkmm-2.4/gtkmm/treeviewcolumn.h: In constructor `Gtk::TreeViewColumn::TreeViewColumn(const Glib::ustring&, const Gtk::TreeModelColumn<ColumnType>&) [with T_ModelColumnType = Glib::RefPtr<Gdk::Pixbuf>]': /opt/xmingw/i386-mingw32msvc/include/gtkmm-2.4/gtkmm/treeviewcolumn.h:795: internal compiler error: in rest_of_handle_final, at toplev.c:2064 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.mingw.org/bugs.shtml> for instructions. make: *** [win32/MainWindow.o] Error 1 It crashes both under win32 and under linux (cross compilation on Gentoo), using latest stable MinGW. The crashing code is something like this: ///// Header file of MainWindow class ///// class MainWindow : public MainWindow_glade { // ... other stuff enum TreeItemType { TypeNone, TypeSettings, TypeServer, TypeMachine, TypeMachineActual, TypeMachineHistory }; class TreeColumns : public Gtk::TreeModel::ColumnRecord { public: TreeColumns() { add(m_icon); add(m_strText); add(m_type); add(m_guidMajor); add(m_guidMinor); } Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > m_icon; Gtk::TreeModelColumn<Glib::ustring> m_strText; Gtk::TreeModelColumn<guid::GUID> m_guidMajor, m_guidMinor; Gtk::TreeModelColumn<TreeItemType> m_type; } m_columns; // ... other stuff } ///// Crashing line in CPP file of MainWindow class ///// treeMain->append_column("", m_columns.m_icon); ///// treeMain's declaration: Gtk::TreeView * treeMain; //(generated by glademm) It would be great if this bug is fixed. Any workaround would be really appreciated too. Thanks ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2005-06-30 08:23 Message: Logged In: YES user_id=11494 I can't really use that testcase without downloading external headers. Could you please compile the offending module with -save- temps flag and upload the preprocessed source (the .ii file) That will provide a self-contained testcase. Thanks Danny ---------------------------------------------------------------------- Comment By: Lubo Doleel (lubosdolezel) Date: 2005-06-29 23:55 Message: Logged In: YES user_id=1090631 I've created a very simple bug testcase. I am doing cross-compiling "by hand" = custom makefiles and I currently have no Windows available. => No configure = hardcoded paths. So you'll have to edit the makefile for your system. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2005-06-29 18:54 Message: Logged In: YES user_id=11494 A self-contained testcase would be much appreciated. These types of errors with dllimport of classes are a real and persistent prblem. On gcc-trunk they an even bigger prpblem than in an earlier versions, becaise much of the optmization is done earlier (at tree level rather than RTL), before class members are actually marked as dllimport. I'm working on apatch that fixes gcc-truunk, so would really like to see if I've missed something. halekd suggests that is is related to import of an instance of a templated class. Can you provide a testcase? Danny ---------------------------------------------------------------------- Comment By: lost-coder (haleykd) Date: 2005-06-29 17:49 Message: Logged In: YES user_id=485500 The original problem is triggered by a templateized constructor for TreeViewColumn. The actuall problem is not being able to derive from a class that's in a dll. To test, create a class in a dll with a virtual function. Then try to create a derived class in the main executable. ---------------------------------------------------------------------- Comment By: Lubo Doleel (lubosdolezel) Date: 2005-06-29 06:57 Message: Logged In: YES user_id=1090631 Version information: Reading specs from /opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/specs Configured with: ./configure --target=i386-mingw32msvc --prefix=/opt/xmingw --enable-languages=c,c++,f77 --disable-shared --disable-nls --enable-threads --with-gcc --with-gnu-ld --with-gnu-as --disable-win32-registry --enable-sjlj-exceptions --without-x --without-newlib --disable-debug Thread model: win32 gcc version 3.4.2 (mingw-special) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1229226&group_id=2435 |