[Mono-list] mono on FC4 - let's get it working!
Alex Roman
allex2k3 at yahoo.ca
Sun Jul 24 17:42:05 EDT 2005
I've made 2 test files:
1.h:
--snip--
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char* string;
int length;
} String;
--snip--
1.c:
--snip--
#include "1.h"
String s;
int main (int argc, char** argv) {
s.string = (char*)malloc(10);
strcpy(s.string, "hi");
printf("%s\n", s.string);
return 0;
}
--snip--
I've compiled them:
$ gcc 1.c -o 1
And I ran 1:
[aroman at idaho structs]$ ./1
hi
As you can see, the syntax seems to work in this case... Why not in the case of gdip.h I wonder?
Alex
Alex Roman wrote:
> Hi,
>
> Due to the fact that Fedora Core 4 uses gcc 4.0, mono packages can't be
> compiled. You get errors at compile-time.
>
> I've been trying to compile some packages (stuck early at libgdiplus).
>
> Here's what I've done so far:
>
> 1. Pre-requisites
> =================
>
> 1.1 Glitz
> ---------
>
> $ cvs -d:pserver:anoncvs at cvs.freedesktop.org:/cvs/cairo login
> CVS password: <hit return>
> $ cvs -d:pserver:anoncvs at cvs.freedesktop.org:/cvs/cairo co glitz
> $ cd glitz
> $ ./autogen.sh --prefix=/usr
> $ make
> $ sudo make install
>
>
> 1.2 libgdiplus
> --------------
>
> $ svn co svn://mono.myrealbox.com/source/trunk/libgdiplus
> $ cd libgdiplus
>
> 1.2.1 Updated cairo and libpixman
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> $ mv cairo cairo_old
> $ mv libpixman libpixman_old
>
> $ cvs -d :pserver:anoncvs at cvs.cairographics.org:/cvs/cairo login
> $ cvs -d :pserver:anoncvs at cvs.cairographics.org:/cvs/cairo co libpixman
> cairo
>
> $ cd libpixman
> $ ./autogen.sh --prefix=/usr
> $ make
> $ sudo make install
> $ cd ..
>
> $ cd cairo
> $ ./autogen.sh --prefix=/usr
> $ cd ..
>
> 1.2.2 Continuing with libgdiplus
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> $ ./autogen.sh --prefix=/usr
> $ make
>
>
>
> This is where it stops working...
>
> Here is the compile log:
>
> --snip--
> make[2]: Leaving directory `/home/aroman/mono/libgdiplus/cairo'
> Making all in src
> make[2]: Entering directory `/home/aroman/mono/libgdiplus/src'
> if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I. -I.. -I../libpixman/src -I../libpixman/src -I../cairo/src
> -I../cairo/src -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/freetype2 -Wall -Werror -Wno-unused -Wno-format -g -O2
> -pthread -MT adjustablearrowcap.lo -MD -MP -MF
> ".deps/adjustablearrowcap.Tpo" -c -o adjustablearrowcap.lo
> adjustablearrowcap.c; \
> then mv -f ".deps/adjustablearrowcap.Tpo"
> ".deps/adjustablearrowcap.Plo"; else rm -f
> ".deps/adjustablearrowcap.Tpo"; exit 1; fi
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../libpixman/src -I../libpixman/src
> -I../cairo/src -I../cairo/src -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -Wall -Werror
> -Wno-unused -Wno-format -g -O2 -pthread -MT adjustablearrowcap.lo -MD
> -MP -MF .deps/adjustablearrowcap.Tpo -c adjustablearrowcap.c -fPIC
> -DPIC -o .libs/adjustablearrowcap.o
> In file included from adjustablearrowcap.c:27:
> gdip.h:827: error: syntax error before 'cairo_font_t'
> cc1: warnings being treated as errors
> gdip.h:827: warning: no semicolon at end of struct or union
> gdip.h:832: error: syntax error before '}' token
> gdip.h:832: warning: type defaults to 'int' in declaration of 'GpFont'
> gdip.h:832: warning: data definition has no type or storage class
> gdip.h:840: error: syntax error before 'GpFont'
> gdip.h:840: warning: no semicolon at end of struct or union
> gdip.h:842: error: syntax error before '}' token
> gdip.h:842: warning: type defaults to 'int' in declaration of
> 'GpCachedFont'
> gdip.h:842: warning: data definition has no type or storage class
> gdip.h:1105: warning: type defaults to 'int' in declaration of 'GpFont'
> gdip.h:1105: error: syntax error before '*' token
> gdip.h:1106: warning: type defaults to 'int' in declaration of 'GpFont'
> gdip.h:1106: error: syntax error before '*' token
> gdip.h:1107: warning: type defaults to 'int' in declaration of 'GpFont'
> gdip.h:1107: error: syntax error before '*' token
> gdip.h:1153: error: syntax error before 'GpFont'
> gdip.h:1155: error: syntax error before '*' token
> make[2]: *** [adjustablearrowcap.lo] Error 1
> make[2]: Leaving directory `/home/aroman/mono/libgdiplus/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/aroman/mono/libgdiplus'
> make: *** [all] Error 2
> [aroman at idaho libgdiplus]$
> --snip--
>
> And here are the relevan parts of src.gdip.h:
> --snip--
> 816 typedef struct {
> 817 FcPattern* pattern;
> 818 bool allocated;
> 819 short height;
> 820 short linespacing;
> 821 short celldescent;
> 822 short cellascent;
> 823 } GpFontFamily;
> 824
> 825
> 826 typedef struct {
> 827 cairo_font_t* cairofnt;
> 828 float sizeInPixels;
> 829 GpFontStyle style;
> 830 void *wineHfont;
> 831 FT_Library ft_library;
> 832 } GpFont;
> 833
> 834
> 835 typedef struct
> 836 {
> 837 char szFamily [128];
> 838 float sizeInPixels;
> 839 GpFontStyle style;
> 840 GpFont * font;
> 841 int refcount;
> 842 } GpCachedFont;
> 843
> --snip--
>
> Now, I've been thinking and I cannot find anything wrong with this
> source code snippet. No apparent syntax errors. It looks right.
>
> Can anyone find what is wrong with it or is there a new gcc4 option that
> can be used?
>
> Let's get this working! I am willing to spend some time hackin at this,
> but at the moment, I am stuck.
>
>
>
> Alex Roman.
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list