Build a GTK development environment in Windows XP

Source: Internet
Author: User

Build a GTK development environment in Windows XP
GTK: ftp://ftp.gtk.org/pub/gtk/
Download the GTK compressed file and decompress it to the directory X without spaces or Chinese characters.
Set the environment variable pkg_config_path to the configuration *. PC directory of PKG-config. The default value is/lib/pkgconfig/
Add the GTK directory/bin to the environment variable path.
For example, if my GTK is decompressed under the D: \ directory
Pkg_config_path = D: \ Lib \ pkgconfig

Path = % PATH %; D: \ bin \

Modify all *. PC files under Lib \ pkgconfig and change the prefix of the first line to the GTK directory.
Prefix = D :\
The rest is to install the compilation environment, such as cygwin, msys. I am directly using gcc under the DEV-C ++ bin directory.

It is worth noting that the PKG-config command and GCC compilation always say that the parameter is invalid. only the PKG-config output can be written into the MAKEFILE file. in the past, it seems that you can download the new PKG-config and re-compile it. But now I don't have a compilation environment, so I wrote it directly in the MAKEFILE file.
PS: modifying the PC files under the pkgconfig directory is very cumbersome. The number of files is too large. If Vim is used, open Vim in the pkgconfig directory and use the following command to quickly implement it.
: ARGs *. PC
: Argdo % S/C: \/\ W * \/\ x */D:/g | update
This is the vim multi-File Operation Command.

% S/C: \/\ W * \/\ x */D:/g is replaced with the actual replacement command.

The following is the Linux directory structure in my XP environment.
D: directory as the root directory.
D: \ bin directory is the directory of the program I downloaded, including all the files under bin of Dev-C ++, executable files of tc2.0, and masm5.0 files, all files in the bin directory of GTK + are also copied to this directory.
D: \ Lib is the library file directory. All files under the dev-C ++ lib directory are under this directory, and GTK and tc2.0 are under this directory.
D: \ include is the same.

Finally, set path to D: \ bin, and you can use cmd to call these commands. Of course, there is still a long way to go between CMD and bash. ''is not supported.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.