Re: Cannot compile Gtk# v2.8.5

Probably not a constructive reply, but... isn't moving from Linux to
Windows, especially to c# which is patented, totally considered as
moving backwards?

You're already there, surrounded with software freedom! Why go back to
the closed spying tracking NSA-back-door MS-product-only tools?

No offense, just expressing thoughts.

By the way you can develop with Gtk# on MonoDevelop.

On ד', 2013-06-26 at 21:12 +0000, Orton, Steven J (IS) wrote:
Hello listers,


This is my first post here.  I'll explain my situation, while trying
not to forget any important details.  Then I'll pose my question.


I am on a project that has many GUIs running on Linux boxes written in
Motif.  We are switching everything to Windows and C#.  The look and
feel of the GUIs must remain the same.  My task is to find a way to
recreate these GUIs in C# with a Motif look and feel.  This led me to


Here are the following requirements for our development environment.


Visual Studio 2008




I had good success with the latest version running in VS 2010, 32-bit,
but our requirements led me to download v2.8.5 and try to compile.
I'm compiling in the current version of Cygwin and the 64-bit version
of GTK+ v2.16.  I opened a "VS2008 x64 Cross Tools" command window to
do the compile in.  I currently have to alter the makefiles in the
source to run the 64-bit toolchain and also cut out the pkg-config
calls as they are not working for me for some reason.


I've been successful in creating the objects until I get to the gtk
folder.  I basically am getting linker errors with trying to find many
methods starting with "_gtk".  I also tried compiling against v2.22 of
GTK+ 64-bit with similar results.  I looked at the required libraries
and found the method signatures in gtk-win32-2.0, but without the
leading underscore.  So, for example, the linker complains about not
finding "_gtk_tree_model_get_type", but the library has
"gtk_tree_model_get_type" (no leading underscore).  This confuses me
greatly as I cannot find any instances of methods in GTK with leading
underscores except ones with a prepended "__impl_gtk_".


Here is my output from the linker:



make[2]: Entering directory `/cygdrive/c/dev/GtkSharp/2.8.5/gtk/glue'
i686-w64-mingw32-gcc -mno-cygwin -mms-bitfields -c  -I./
.22/include/gtk-2.0 -I/cygdrive/c/dev/Gtk+2.22/include/glib-2.0
v/Gtk+2.22/lib/glib-2.0/include  -I/cygdrive/c/dev/Gtk
+2.22/include/pango-1.0 -I
/cygdrive/c/dev/Gtk+2.22/lib/gtk-2.0/include -I/cygdrive/c/dev/Gtk
cairo  -I/cygdrive/c/dev/Gtk+2.22/include/atk-1.0
lude/gdk-pixbuf-2.0 -I/cygdrive/c/dev/Gtksharp/include -o generated.o
i686-w64-mingw32-dllwrap -mno-cygwin -mms-bitfields --target
i386-mingw32 --expo
rt-all-symbols --output-lib=libgtksharpglue-2.a
--dllname=gtksharpglue-2.dll --d
river-name=i686-w64-mingw32-gcc --output-def=gtksharpglue-2.def
         cellrenderer.o           clipboard.o
    container.o              generated.o              nodestore.o
bject.o                 selectiondata.o          style.o
list.o           widget.o                 win32dll.o
-L/cygdrive/c/cygwin/lib -L
/cygdrive/c/dev/Gtk+2.22/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lgdk_pixbuf-2.0
-lpango-1.0 -lcairo
-lpixman-1 -lfontconfig  -lexpat -lfreetype -lpng14 -lz -lgobject-2.0
2.0 -lgthread-2.0 -lglib-2.0 -lintl -lglade-2.0
i686-w64-mingw32-dllwrap: no export definition file provided.
Creating one, but that may not be what you want
nodestore.o:nodestore.c:(.text+0x43e): undefined reference to
object.o:object.c:(.text+0x42): undefined reference to
object.o:object.c:(.text+0x69): undefined reference to
targetlist.o:targetlist.c:(.text+0x4f): undefined reference to
widget.o:widget.c:(.text+0x50): undefined reference to
widget.o:widget.c:(.text+0x73): undefined reference to
widget.o:widget.c:(.text+0x92): undefined reference to
widget.o:widget.c:(.text+0xd0): undefined reference to
widget.o:widget.c:(.text+0x182): undefined reference to
widget.o:widget.c:(.text+0x189): undefined reference to
widget.o:widget.c:(.text+0x2d0): undefined reference to
widget.o:widget.c:(.text+0x30a): undefined reference to
widget.o:widget.c:(.text+0x326): undefined reference to
widget.o:widget.c:(.text+0x357): undefined reference to
collect2: ld returned 1 exit status
i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1
makefile.win32:35: recipe for target `gtksharpglue-2.dll' failed
make[2]: *** [gtksharpglue-2.dll] Error 1
make[2]: Leaving directory `/cygdrive/c/dev/GtkSharp/2.8.5/gtk/glue'
makefile.win32:8: recipe for target `windows' failed
make[1]: *** [windows] Error 2
make[1]: Leaving directory `/cygdrive/c/dev/GtkSharp/2.8.5/gtk'
makefile.win32:23: recipe for target `windows' failed
make: *** [windows] Error 1



Here is my makefile for the gtk glue directory:



GTK_CFLAGS=-I./ -I/cygdrive/c/dev/Gtk+2.22/include/gtk-2.0
-I/cygdrive/c/dev/Gtk+2.22/include/glib-2.0 -I/cygdrive/c/dev/Gtk
+2.22/lib/glib-2.0/include \
-I/cygdrive/c/dev/Gtk+2.22/include/pango-1.0 -I/cygdrive/c/dev/Gtk
+2.22/lib/gtk-2.0/include -I/cygdrive/c/dev/Gtk+2.22/include/cairo \
-I/cygdrive/c/dev/Gtk+2.22/include/atk-1.0 -I/cygdrive/c/dev/Gtk
+2.22/include/gdk-pixbuf-2.0 -I/cygdrive/c/dev/Gtksharp/include

GTK_LIBS=-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0
-lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0
-lcairo -lpixman-1 -lfontconfig \
-lexpat -lfreetype -lpng14 -lz -lgobject-2.0 -lgmodule-2.0
-lgthread-2.0 -lglib-2.0 -lintl -lglade-2.0

GTK_LIB_PATHS= -L/cygdrive/c/cygwin/lib -L/cygdrive/c/dev/Gtk+2.22/lib
CC=i686-w64-mingw32-gcc -mno-cygwin -mms-bitfields

DLLWRAP=i686-w64-mingw32-dllwrap -mno-cygwin -mms-bitfields --target
i386-mingw32 --export-all-symbols

        adjustment.o            \
        cellrenderer.o          \
        clipboard.o             \
        colorseldialog.o        \
        container.o             \
 generated.o             \
        nodestore.o             \
        object.o                \
        selectiondata.o         \
        style.o                 \
 targetlist.o  \
        widget.o                \

all: gtksharpglue-2.dll

%.o: %.c
 $(CC) -c $(CFLAGS) $(GTK_CFLAGS) -o $@ $^ 

gtksharpglue-2.dll: $(GLUE_OBJS)
 $(DLLWRAP) --output-lib=libgtksharpglue-2.a
--dllname=gtksharpglue-2.dll --driver-name=i686-w64-mingw32-gcc
--output-def=gtksharpglue-2.def $(GLUE_OBJS) $(GTK_LIB_PATHS)

 rm -f gtksharpglue-2.dll *.o libgtksharpglue-2.a



Notice the CC and DLLWRAP are using 64-bit versions.  I must mention
that I tried compiling this in MinGW and didn't even get as far as I
have now.


Any help on this problem will be greatly appreciated.



Steven Orton


gtk-list mailing list
gtk-list gnome org

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