Re: gtk with mingw - compile problem helloworld

Alexander Yukhimets <[email protected]> Mon, 14 Apr 2003 22:44:28 -0500
Newsgroups gmane.comp.video.gimp.windows.devel
Message-ID <[email protected]>
Hi.

On Tue, Apr 15, 2003 at 02:59:10AM -0000, jaccobacco wrote:
> Hi everybody,
> 
> The problem I'm having is surely very simple and I'm sorry to post 
> it.  However, I have tried for three hours now to work out what I'm 
> doing wrong, and to no avail.  Here are steps I've taken:
> 
> 1.  Installed MingW-2.0.0.3 into d:\usr\share\gcc
> 2.  Installed GTK-2.2.1 into d:\usr\share\gcc
> 3.  Set my path to include 
>     d:\usr\share\gcc\bin 
>     d:\usr\share\gcc\lib
> 4.  Created a helloworld.c file based on the gtk manual
> 5.  Created a gtk.bat file to do simple compiles, contents are:
> 
> set CFLAGS=-lgtk-win32-2.0 -lgdk-win32-2.0 -lgthread-2.0 -lgdi32 -
> lole32 -luuid -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -
> lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv 

This variable is more typically called LIBS
You also need in front -Ld:/usr/share/gcc/lib

> set BFLAGS=-I"\gtk-2.0" -I"\gtkdeps-2.0" -I"\gtk-2.0\include" -I"\atk-
> 1.0" -I"\pango-1.0" -I"\glib-2.0" -I"\glib-2.0" -I"\glib-2.0\include" 

Here actually the source of the error: every -I part should look like
-Id:/usr/share/gcc/include/gtk-2.0
...

Best,

Alex Y.
> 
> g++ %1 %2 %3 -mno-cygwin -mms-bitfields %CFLAGS% %BFLAGS%
> 
> 6.  When trying to compile by typing in:  
>     gtk helloworld.c -o helloworld.exe
>     I get the following link error:
> 
>     helloworld.c:1:22: /gtk/gtk.h: No such file or directory
> 
> What am I missing?
> 
> 
> 
> To Post a message, send it to: [email protected]
> To Unsubscribe, send a blank message to: [email protected] 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 

-- 
   _ 
 _( )_
(     (o___           +-----------------------+
 |      _ 7           | Alexander  Yukhimets  |
  \    (")            | http://www.AlexY.org  |
  /     \ \           +-----------------------+