GTK + Development Environment Construction in Win32 & VC ++ 6 IDE Environment (Prebuild, non-SRC)

zhaozj2021-02-16  42

GTK Development Environment Construction in Win32 & VC 6 IDE Environment (Prebuild, non-SRC)

eduyu

2004/01/02

Foreword

This is a development environment that most of the domestic programmers compare the tendency. Mainly familiar with VC 6.

1. Download:

Http://keihanna.dl.sourceforge.net/sourceforge/gtk-win/gtk-runtime-environment-2.2.4.1.exe

http://keihanna.dl.sourceforge.net/sourceforge/gtk-win/gtk-development-environment-2.2.4.1.exe

This is someone else's GTK, one is Runtime, mainly.dll, and the other is the file set for Win32 development. Mainly .h and .lib files.

2. Installation:

Install Runtime first, pay attention to the environment variable path To manually join the directory where the .dll is located. Then then the latter is installed, and the "incrude files" of VC 6 is more troublesome. In short, in the VC 6 menu-> Tools-> Options-> Directories, all the installed completions are included, and the subdirectories in this directory are added to "include files" will not report wrong, if reported It is estimated to be less glibconfig.h, etc., these inside the lib directory in your installation directory, then copy to .h or put these directories to "include files". Finally, add LiB to "library files".

3. Test:

Establish a project. Inside the Project Setting Link, remove those .lib files, add as follows:

Glib-2.0.lib gtk-win32-2.0.lib GDK-Win32-2.0.lib GOBJECT-2.0.LIB GDK_PIXBUF-2.0.lib gthread-2.0.lib gmodule-2.0.lib pango-1.0.lib Intl.lib. Then, the following code is pasted in .cpp file:

#include

INT Main (int Argc, char * argv []) {

Gtkwidget * window;

GTK_INIT (& Argc, & Argv);

WINDOW = gtk_window_new (gtk_window_toplevel);

GTK_WIDGET_SHOW (Window);

gtk_main ();

Return 0;

}

Compile, if prompted, delete the words such as stdafx.h in the C / C of Project Setting. See the help of the Cl.exe compiler if necessary

转载请注明原文地址:https://www.9cbs.com/read-25046.html

New Post(0)