Hi! I have a small problem with compiling an application using glademm. Here is the error message: g++ -c -pipe -Wall -W -O2 -DDEBUG `pkg-config --cflags libglade-2.0 gtkmm-2.4 gnet-2.0 libglademm-2.4` -o ampavi_server.o ampavi_server.cc gcc -ldebugging `pkg-config --libs libglade-2.0 gtk+-2.0 gnet-2.0 gtkmm-2.4` -o ampavi_server ampavi_server.o main.o ampavi_server.o: In function `CAmpaviServer::CAmpaviServer()': ampavi_server.cc:(.text+0x3d2): undefined reference to `Gnome::Glade::Xml::create(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Glib::ustring const&, Glib::ustring const&)' ampavi_server.o: In function `CAmpaviServer::CAmpaviServer()': ampavi_server.cc:(.text+0x6f0): undefined reference to `Gnome::Glade::Xml::create(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Glib::ustring const&, Glib::ustring const&)' ampavi_server.o:(.gcc_except_table+0xd8): undefined reference to `typeinfo for Gnome::Glade::XmlError' ampavi_server.o:(.gcc_except_table+0x14c): undefined reference to `typeinfo for Gnome::Glade::XmlError' collect2: ld returned 1 exit status make: *** [ampavi_server] Error 1 I hope that anyone can help me. The glade file work in an application written in C Here is my source code: main.cc: #include <iostream> #include "ampavi_server.h" int main(int argc, char **argv) { Gtk::Main kit(argc, argv); CAmpaviServer ampavi_server; Gtk::Main::run(ampavi_server); return(EXIT_SUCCESS); } ampavi_server.h #ifndef ___AMPAVI_SERVER_H__ #define ___AMPAVI_SERVER_H__ #include <gtkmm.h> #include <libglademm.h> class CAmpaviServer:public Gtk::Window { private: Glib::RefPtr < Gnome::Glade::Xml > xml; int server; public: CAmpaviServer(); virtual ~ CAmpaviServer(); }; ampavi_server.cc: #include <iostream> #include <libglademm/xml.h> #include "ampavi_server.h" CAmpaviServer::CAmpaviServer():server(SERVER_DISCONNECT) { try { xml = Gnome::Glade::Xml::create("ampavi_server.xml", "ampavi_server_window", NULL); } catch(const Gnome::Glade::XmlError & ex) { std::cerr << ex.what() << std::endl; return; } } CAmpaviServer::~CAmpaviServer() { return; } Makefile: CC = gcc CXX = g++ CFLAGS = -pipe -Wall -W -O2 -DDEBUG `pkg-config --cflags libglade-2.0 gtk+-2.0 gnet-2.0` CXXFLAGS= -pipe -Wall -W -O2 -DDEBUG `pkg-config --cflags libglade-2.0 gtkmm-2.4 gnet-2.0 libglademm-2.4` LINK = gcc LFLAGS = `pkg-config --libs libglade-2.0 gtk+-2.0 gnet-2.0 gtkmm-2.4` TAR = tar -cf GZIP = gzip -9f # Files gnet HEADERS = ampavi_server.h SOURCES = ampavi_server.cc main.cc OBJECTS = ampavi_server.o main.o INTERFACES = DIST = TARGET = ampavi_server INTERFACE_DECL_PATH = . # Implicit rules .SUFFIXES: .cpp .cxx .cc .C .c .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< # Build rules all: $(TARGET) $(TARGET): $(OBJECTS) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) clean: -rm -f $(OBJECTS) $(TARGET) -rm -f *~ core CU Michael -- ,''`. Michael Ott, e-mail: michael at king-coder dot de : :' : Debian SID on Thinkpad T43: `. `' http://www.zolnott.de/laptop/ibm-t43-uc34nge.html `-
Attachment:
pgpo0vV4nR0Oe.pgp
Description: PGP signature