|
我刚接触嵌入式,现在想交叉编译GTK+。
我按照那个精华贴一步步编译的
但是编译到DirectFB的时候遇到了问题……
我的编译过程是
- export CFLAGS="-I/usr/gtk -I/usr/gtk/include/freetype2 -I/usr/gtk/include/freetype2/freetype $CFLAGS"
- export LDFLAGS="-L/usr/gtk/lib -lz $LDFLAGS"
- ./configure --prefix=/usr/gtk --host=arm-linux --target=arm --disable-osx --disable-debug-support --disable-mmx --disable-sse --enable-fbdev --disable-sdl --disable-vnc --disable-sysfs --enable-zlib --disable-gif --disable-video4linux --with-gfxdrivers=none
- make
复制代码
当make的时候出现了以下错误:
- ……
- make[3]: Entering directory `/home/GTK/DirectFB-1.1.1/systems/x11'
- /bin/bash ../../libtool --tag=CC --mode=compile arm-linux-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../lib -I../../lib -I../../src -I/usr/X11R6/include -D_REENTRANT -O3 -ffast-math -pipe -I/usr/gtk/include -I/usr/gtk/include/freetype2 -I/usr/gtk/include/freetype2/freetype -I/usr/gtk -I/usr/gtk/include/freetype2 -I/usr/gtk/include/freetype2/freetype -D_GNU_SOURCE -Werror-implicit-function-declaration -MT x11input.lo -MD -MP -MF .deps/x11input.Tpo -c -o x11input.lo x11input.c
- mkdir .libs
- arm-linux-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../lib -I../../lib -I../../src -I/usr/X11R6/include -D_REENTRANT -O3 -ffast-math -pipe -I/usr/gtk/include -I/usr/gtk/include/freetype2 -I/usr/gtk/include/freetype2/freetype -I/usr/gtk -I/usr/gtk/include/freetype2 -I/usr/gtk/include/freetype2/freetype -D_GNU_SOURCE -Werror-implicit-function-declaration -MT x11input.lo -MD -MP -MF .deps/x11input.Tpo -c x11input.c -fPIC -DPIC -o .libs/x11input.o
- x11input.c:39:22: X11/Xlib.h: No such file or directory
- x11input.c:40:23: X11/Xutil.h: No such file or directory
- x11input.c:41:24: X11/keysym.h: No such file or directory
- In file included from x11input.c:52:
- xwindow.h:36:33: X11/extensions/XShm.h: No such file or directory
- In file included from x11input.c:52:
- xwindow.h:44: error: parse error before "Window"
- xwindow.h:44: warning: no semicolon at end of struct or union
- xwindow.h:45: warning: data definition has no type or storage class
- xwindow.h:46: error: parse error before "gc"
- xwindow.h:46: warning: data definition has no type or storage class
- xwindow.h:47: error: parse error before '*' token
- xwindow.h:47: warning: data definition has no type or storage class
- xwindow.h:49: error: parse error before "colormap"
- xwindow.h:49: warning: data definition has no type or storage class
- xwindow.h:51: error: parse error before '*' token
- xwindow.h:51: warning: data definition has no type or storage class
- xwindow.h:63: error: parse error before "pixmp1"
- xwindow.h:63: warning: data definition has no type or storage class
- xwindow.h:64: error: parse error before "pixmp2"
- xwindow.h:64: warning: data definition has no type or storage class
- xwindow.h:65: error: parse error before "NullCursor"
- xwindow.h:65: warning: data definition has no type or storage class
- xwindow.h:66: warning: data definition has no type or storage class
- xwindow.h:68: error: parse error before "dfb_x11_open_window"
- xwindow.h:68: error: parse error before '*' token
- xwindow.h:68: warning: data definition has no type or storage class
- xwindow.h:69: error: parse error before '*' token
- In file included from x11.h:39,
- from x11input.c:54:
- x11image.h:50: error: parse error before "Visual"
- x11image.h:50: warning: no semicolon at end of struct or union
- x11image.h:52: warning: data definition has no type or storage class
- x11image.h:53: error: parse error before "seginfo"
- x11image.h:53: warning: data definition has no type or storage class
- x11image.h:54: warning: data definition has no type or storage class
- x11image.h:57: error: parse error before '*' token
- x11image.h:62: error: parse error before '*' token
- x11image.h:64: error: parse error before '*' token
- In file included from x11input.c:54:
- x11.h:63: error: parse error before "XWindow"
- x11.h:63: warning: no semicolon at end of struct or union
- x11.h:64: warning: data definition has no type or storage class
- x11.h:65: error: parse error before '*' token
- x11.h:65: warning: data definition has no type or storage class
- x11.h:68: error: parse error before '*' token
- x11.h:68: warning: data definition has no type or storage class
- ……
复制代码
源码我一点也没动,为什么会出现这种错误呢,望大家帮帮我~ |
|