RE: GTK+ and MinGw..............



Suresh  Kumar writes:
     When i tried the same thing using gcc
( gcc -c hello.c `pkg-config gtk+-2.0 -libs -cflags`), i got the 
error message such that "pkg-config: No such file or directory".

In what shell is that? Please note that the Windows Command Prompt
(cmd.exe or command.com) doesn't understand the Unix shell style
backquote syntax (the ` stuff).

    Finally i passed all include files along with their path as 
arguments to gcc by hand.

    c:> gcc -c hello.c -Ic:/gtk/include/gtk-2.0 [...]

Yes, if you don't have a Unix style shell, you will have to do it like
that. But instead of typing that by hand every time, at least put the
command(s) in a .bat file. Preferrably, learn to use Make.

BTW, you should also pass gcc the -mms-bitfields flag.

When executed hello.exe, I got an error message stating that "The
procedure entry point g_get_application_name could not be located
in the dynamic link library libglib-2.0-0.dll". I set "c:\gtk\lib"
to PATH variable which contains all library files.

Well, are you sure libglib-2.0-0.dll is in c:\gtk\lib? The zipfile I
distribute has it in "bin".

     Now, How can i use pkg-config in gcc so that all needed 
include files will be taken from pkg-config's output?

Either use some Unix-style shell that understands backquotes, or
cut-and-paste pkg-config's output into a .bat file, or a makefile.

--tml





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