Re: gtkmm and libglademm under MSVC.NET



Clyde Mallon wrote:
Hi

I actually put a posting up regarding this topic a while ago. I never
got any feedback, but I now have a different problem: I have gtkmm
working using MSVC and can bring up a basic blank window. When I try
load an interface from a file using these lines:

Glib::RefPtr<Gnome::Glade::Xml> refXml;
refXml = Gnome::Glade::Xml::create("basic.glade");

I get the following linking errors:

Linking...
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; use /NODEFAULTLIB:library
libglademm.lib(xml.obj) : error LNK2019: unresolved external symbol
_glade_xml_construct referenced in function "protected: __thiscall
Gnome::Glade::Xml::Xml(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,class
Glib::ustring const &,class Glib::ustring const &)"
(??0Xml Glade@Gnome@@IAE ABV?$basic_string@DU?$char_traits D@std@@V?$all
ocator D@2@@std@@ABVustring Glib@@1 Z)
libglademm.lib(xml.obj) : error LNK2019: unresolved external symbol
_glade_xml_new_from_buffer referenced in function "protected: __thiscall
Gnome::Glade::Xml::Xml(char const *,int,class Glib::ustring const
&,class Glib::ustring const &)"
(??0Xml Glade@Gnome@@IAE PBDHABVustring@Glib@@1 Z)

I chopped a few out...

libglademm.lib(xml.obj) : error LNK2019: unresolved external symbol
_glade_get_widget_tree referenced in function "public: static class
Glib::RefPtr<class Gnome::Glade::Xml> __cdecl
Gnome::Glade::Xml::get_widget_tree(class Gtk::Widget &)"
(?get_widget_tree Xml@Glade Gnome@@SA?AV?$RefPtr VXml@Glade Gnome@@@Glib
@@AAVWidget Gtk@@@Z)
Debug/Basic.exe : fatal error LNK1120: 9 unresolved externals

The thing is I had to make the libglademm.lib file myself because there
doesn't seem to be any support for MSVC. What am I doing wrong here? It
looks like I'm using the wrong header file or something, but the one I'm
including is the one that correlates to my .lib file.

Try to select the "Multithreaded Debug DLL" as runtime library in your project C/C++ properties (Code generation). You should also enable RTTI.

You might also want to have a look at this bugzilla entry

http://bugzilla.gnome.org/show_bug.cgi?id=158040

I don't think MSVC is a stable option for gtkmm right now...

Cedric



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]