Re: Missing files by using GTK with Windows?



Christian Schneider writes:
glibconfig.h is in
D:\Software-Entwicklung\Dev-Cpp\lib\glib-2.0

(You mean in the "include" subfolder there, at least that's where it
is supposed to be, if you have a standard hierarchy.)

But why it is there?

Because the headers in <top>/include/glib-2.0 are platform-independent
(the same on all platforms where GLib runs), while the glibconfig.h
file's contents depends on the platform, and possibly even compiler
used. (For Win32, a specially handcrafted version of glibconfig.h is
distributed, that works for both gcc and MSVC. But in general
glibconfig.h is tailored specifically for one compiler on one
platform.)

I found a document from the
internet that it is there because "configure.in" need
it. But can "configure.in" used under Windows as well?

It doesn't need it, it generates it. Yes, configure.in is used to
produce a configure script on Windows, too.

Should I always add the
D:\Software-Entwicklung\Dev-Cpp\lib\glib-2.0 to the
"includes" 

(The "include" subfolder of it.) Yes.

Well, do the correct -I switches get passed to the
compiler? 

Excuse me, I'm a newbie. Do you mean with "-I" the
linking?

No, I mean the switches that are passed to the compiler that tell it
where to look for header files.

Now I get a lot of errors like:
[Linker error] undefined reference to `g_malloc'
[Linker error] undefined reference to

You need to tell the linker to look in the libglib-2.0.dll.a
library.

`gtk_label_get_type'

And libgtk-win32-2.0.dll.a.

I found in a help file that I can add linking files
with "Projekt Optionen"->"Parameter"->"Linker". But
how can I use pkg-config there?

Not directly, I assume. Run "pkg-config --libs gtk+-2.0" manually,
and copy-pastes what it outputs to the Linker dialog.

(Stuff like this should really be covered in Dev-C++
documentation. Feel free to forward to the Dev-C++ maintainers, or to
the people offering GTK for Dev-C++.)

--tml





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