How to build GTK+ AP for ARM based of Linux platform at x86 machines



Hi,
Could you help to solve this problem?
I have implemented the GTK+ AP in x86 machines.
After use gcc to compile it can correct execute.
When I change to use arm-none-linux-gnueabi-gcc that was displayed these error messages.
arm-none-linux-gnueabi-gcc -Wall -g hello.c -o hello `pkg-config --cflags --libs gtk+-2.0`
Error messages:
/usr/bin/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.2/../../../../arm-none-linux-gnueabi/bin/ld:
 cannot find -lgtk-x11-2.0
collect2: ld returned 1 exit status
So I compile the GTK+ libraries for DirectFB in this folder (/opt/arm/gtk).
And set these environment variables.
      CPPFLAGS="-I/opt/arm/gtk/include"
      LDFLAGS="-L/opt/arm/gtk/lib"
      PKG_CONFIG_PATH="/opt/arm/gtk/lib/pkgconfig"
      export CPPFLAGS LDFLAGS PKG_CONFIG_PATH
LD_LIBRARY_PATH="/opt/arm/gtk/lib"
      PATH="/opt/arm/gtk/bin:$PATH"
      export LD_LIBRARY_PATH PATH
Then refresh compile again but still display the same error message.
Thus we use pkg-config and find GTK still use default path and not change to this path (/opt/arm/gtk).
pkg-config --cflags --libs gtk+-2.0
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng12  -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 
-lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0
How to solve this problem please give me suggestion?

Thanks a lot. :)
Best regards,
Aries




________________________________

This e-mail message together with any attachments thereto (if any) is confidential, protected under an 
enforceable non-disclosure agreement, intended only for the use of the named recipient(s) above and may 
contain information that is privileged, belonging to professional work products or exempt from disclosure 
under applicable laws. Any unauthorized review, use, copying, disclosure, or distribution of any information 
contained in or attached to this transmission is STRICTLY PROHIBITED and may be against the laws. If you have 
received this message in error, or are not the named recipient(s), please immediately notify the sender by 
e-mail or telephone at IT support hotline 886-3-2700000 EXT 1333 and delete this e-mail message and any 
attached documentation from your computer. Receipt by anyone other than the intended recipient(s) is not a 
waiver of any attorney-client or work product privilege. Thank you!



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