Re: win32 port of libglademm doesn't work



Hey, Cedrig Gustin gave me the solution:
under Windows the order of compiler and linker flags matters.
So it is important to do give the LDFLAGS after the source files:
$(GCC) $(CFLAGS) -o $(BIN) $(SRC) $(LDFLAGS)
and not
$(GCC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC

Viktor Dick schrieb:
Michael J M Thomson schrieb:

Looks like incompatibilities between gtkmm and libsigc++, might want to check how recent your copy is of the latter. And your mingw version must be 3.4.x, the site mentions "libglademm is now built with g++-3.4.2" and compiler objects can be incompatible between releases. Sorry I can't be of more help.


I updated MinGW, so I have g++-2.4.2 now. This reduced the errors drasticly :) With the old version of gcc, a simple '#include <gtkmm.h>' or '#include <libglademm.h>' produced 50 KB of error output. Compiling with the new version, this simple programs work! But If I try to compile more "complex" source code, it still fails. For example:

main.cpp:
-------------------------------------
#include <gtkmm.h>

int main (int argc, char** argv)
{
    Gtk::Main kit(argc, argv);
    Gtk::Window window1;
    Gtk::Main::run(window1);
    return 0;
}
-------------------------------------

Makefile:
-------------------------------------
LIBS= gtkmm-2.4
CFLAGS=`pkg-config --cflags $(LIBS)`
LDFLAGS=`pkg-config --libs $(LIBS)`

CPP=g++
SRC=main.cpp
BIN=programm

$(BIN): $(SRC)
    $(CPP) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC)
-------------------------------------

$ make
g++ `pkg-config --cflags gtkmm-2.4` `pkg-config --libs gtkmm-2.4` -o programm main.cpp C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x18c):main.cpp: undefined reference to `Gtk::Main::Main(int&, char**&, bool)' C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x1a9):main.cpp: undefined reference to `Gtk::Window::Window(Gtk::WindowType)' C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x1be):main.cpp: undefined reference to `Gtk::Main::run(Gtk::Window&)' C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x1d3):main.cpp: undefined reference to `Gtk::Window::~Window()' C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x1e8):main.cpp: undefined reference to `Gtk::Main::~Main()' C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x232):main.cpp: undefined reference to `Gtk::Window::~Window()' C:/DOKUME~1/AVDick/LOKALE~1/Temp/ccOQbaaa.o(.text+0x25f):main.cpp: undefined reference to `Gtk::Main::~Main()'
collect2: ld returned 1 exit status
make: *** [programm] Error 1


If I try to open and parse a glade file, there are even more errors.
_______________________________________________
gnomemm-list mailing list
gnomemm-list gnome org
http://mail.gnome.org/mailman/listinfo/gnomemm-list





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