Re: Hello world not show




On 2014/06/04, at 23:02, Chris Moller <moller mollerware com> wrote:

How did you compile it?  

Putting your code in a file called try.c and running the following:

gcc -c try.c `pkg-config --cflags gtk+-3.0`
gcc -o try try.o `pkg-config --libs gtk+-3.0` 

worked okay and running it put up an empty window.
I compiled and run it as below, nothing shows.

$ make
gcc hello.c -o hello -Wall -g -mms-bitfields -IC:/cygwin.new/gtk/include/gtk-3.0 
-IC:/cygwin.new/gtk/include/cairo -IC:/cygwin.new/gtk/include/pango-1.0 -IC:/cygwin.new/gtk/include/atk-1.0 
-IC:/cygwin.new/gtk/include/cairo -IC:/cygwin.new/gtk/include/pixman-1 -IC:/cygwin.new/gtk/include 
-IC:/cygwin.new/gtk/include/freetype2 -IC:/cygwin.new/gtk/include -IC:/cygwin.new/gtk/include/libpng15 
-IC:/cygwin.new/gtk/include/gdk-pixbuf-2.0 -IC:/cygwin.new/gtk/include/libpng15 
-IC:/cygwin.new/gtk/include/glib-2.0 -IC:/cygwin.new/gtk/lib/glib-2.0/include -LC:/cygwin.new/gtk/lib -lgtk-3 
-lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lpangocairo-1.0 -lpangoft2-1.0 -lfreetype -lfontconfig 
-lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 
-lgobject-2.0 -lglib-2.0 -lintl

$ ll
total 145
-rwxr-xr-x 1 zang ǻǵ 61217 Jun  3 20:45 button_box.exe
-rwxr-xr-x 1 zang ǻǵ  1036 Jun  3 21:13 Makefile
-rwxr-xr-x 1 zang ǻǵ   269 Jun  4 23:06 hello.c
-rwxr-xr-x 1 zang ǻǵ  3736 Jun  4 23:06 button_box.c
-rwxr-xr-x 1 zang ǻǵ 13773 Jun  4 23:06 application.c
-rwxr-xr-x 1 zang ǻǵ 60722 Jun  4 23:06 hello.exe

$ ./hello.exe




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