[Gtk-sharp-list] Trouble compiling GTK# on Win32 using .NET 2.0

naijireja naijireja naijireja at yahoo.com
Tue Mar 20 09:19:28 EDT 2007


Hi all,

I had trouble compiling Gtk# 2.0.10 on my machine.

I have the following development environment set up on my machine:
* Windows XP Service Pack 2
* Microsoft .NET 2.0 SDK
* SharpDevelop 2.1
* GTK+ Runtime 2.10.7 rev a
* Cygwin, unknown version.  Output from uname -a:
CYGWIN_NT-5.1 mymachine-1 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin

Because I didn't find any binary packages for GTK# that run in the .NET 2.0 environment, I decided to build from source.  I opened up a Cygwin window and added following directories to the PATH environment variable:

/cygdrive/c/Program Files/Microsoft.NET/SDK/v2.0/Bin/
/cygdrive/c/Program Files/Common Files/GTK/2.0/bin/

When I tried building Gtk# by running "make -f makefile.win32", I got the following output:

for i in generator parser glib pango atk gdk gtk glade gtkdotnet; do                \
        (cp gtk-sharp.snk $i; cd $i; CSC="/cygdrive/C/WINDOWS/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32" make -f makefile.win32) || exit 1;\
    done;
make[1]: Entering directory `/tmp/gtk-sharp-2.10.0/generator'
/cygdrive/C/WINDOWS/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32 /unsafe /out:codegen.exe *.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

make[1]: Leaving directory `/tmp/gtk-sharp-2.10.0/generator'
make[1]: Entering directory `/tmp/gtk-sharp-2.10.0/parser'
/cygdrive/C/WINDOWS/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32 /unsafe /out:gapi-fixup.exe gapi-fixup.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

make[1]: Leaving directory `/tmp/gtk-sharp-2.10.0/parser'
make[1]: Entering directory `/tmp/gtk-sharp-2.10.0/glib'
/cygdrive/C/WINDOWS/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32 /unsafe /nowarn:0660,0661 /target:library /out:glib-sharp.dll /recurse:*.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

Value.cs(275,17): warning CS0612: 'GLib.Boxed' is obsolete
Value.cs(277,15): warning CS0612: 'GLib.Boxed' is obsolete
../gapi-cdecl-insert --keyfile=gtk-sharp.snk glib-sharp.dll
cd glue && make -f makefile.win32
make[2]: Entering directory `/tmp/gtk-sharp-2.10.0/glib/glue'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/gtk-sharp-2.10.0/glib/glue'
make[1]: Leaving directory `/tmp/gtk-sharp-2.10.0/glib'
make[1]: Entering directory `/tmp/gtk-sharp-2.10.0/pango'
../generator/codegen --generate pango-api.xml --outdir=generated --customdir=. --assembly-name=pango-sharp --gluelib-name=pangosharpglue-2 --glue-filename=glue/generated.c --glue-includes=pango/pango.h && touch generated-stamp
Name: options Type: const-cairo_font_options_t* in pango_cairo_context_set_font_options  in method ContextSetFontOptions in type Pango.CairoHelper
rettype: const-cairo_font_options_t* in method ContextGetFontOptions in type Pango.CairoHelper

Generation Summary:
  Enums: 15  Structs: 8  Boxed: 2  Opaques: 13  Interfaces: 0  Objects: 8  Callbacks: 3
  Properties: 0  Signals: 0  Methods: 202  Constructors: 7  Throttled: 1
Total Nodes: 259

/cygdrive/C/WINDOWS/microsoft.net/framework/v1.1.4322/csc.exe /d:WIN32 /unsafe /nowarn:0660,0661 /target:library /r:../glib/glib-sharp.dll /out:pango-sharp.dll /recurse:*.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

generated\CairoHelper.cs(15,37): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(22,38): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(29,35): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(43,36): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(50,38): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(57,37): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(73,33): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(80,33): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
generated\CairoHelper.cs(87,43): error CS0246: The type or namespace name 'Cairo' could not be found (are you missing a using directive or an assembly reference?)
make[1]: *** [windows] Error 1
make[1]: Leaving directory `/tmp/gtk-sharp-2.10.0/pango'
make: *** [windows] Error 1

I understand that most of you use Mono instead of Microsoft's runtime, but if anyone recognizes the errors, I would appreciate any  tips.

Thanks!
 
---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070320/6b70d43b/attachment.html 


More information about the Gtk-sharp-list mailing list