[GtkGLExt] reference for porting gtkglextmm applications to windows vista or xp
- From: 明覺 <shi minjue gmail com>
- To: gtkglext-list gnome org
- Subject: [GtkGLExt] reference for porting gtkglextmm applications to windows vista or xp
- Date: Thu, 4 Jun 2009 20:27:15 +0800
Setup Gtkglextmm Environment for Windows
If you have built a gtkglextmm application in Gnu/Linux system, and
want to port it to windows vista or xp so that your users can use it
in windows, this article is the right reference for you.
There are 3 parts for building gtkglextmm applications in windows:
* gtkglextmm runtime for windows, that's the gtkmm, gtkglext, and
gtkglextmm libraries.
* gcc for windows, to compile your source code and build the executables.
* a shell(msys) like bash for windows, to execute gcc commands
against your source files.
I provide 2 ways to install the 3 parts into your windows system, a
brief way and a detailed way.
The relationship of the 2 ways is, by the detailed way, you install
all kinds of things one by one, and all the installed things go into 2
folders, C:\MinGW\ and C:\msys\; by the brief way, you just copy the 2
resulted folders into your C:\, so that you do not need to install so
many things one by one.
Brief Way
* download the 2 folders MinGW.tar.gz and msys.tar.gz
* extra them to C:\(other pathes is ok, but do not use a path
containing space, such as C:\program files\)
* add [;C:\MinGW\bin] to your environment variable [Path], for gcc
and all the libraries are installed there.
* create a new environment variable named [HOME], with value
[C:\msys\1.0\home], this is used by the msys shell.
Now the environment has been setup completely, and it's time to build
your gtkglextmm program from source code, here is an example:
* copy source code into C:\msys\1.0\home, for example
C:\msys\1.0\home\myapp\main.cc
* double click C:\msys\1.0\msys.bat to open the msys shell
* go to the source code by command [cd /home/myapp]
* build the source code by command [g++ -enable-auto-import
-mwindows -mms-bitfields -mno-cygwin -g `pkg-config --cflags gtkmm-2.4
gtkglextmm-1.2` main.cc `pkg-config --libs gtkmm-2.4 gtkglextmm-1.2`
-o main]
* now you can run main.exe in C:\msys\1.0\home\myapp\.
detailed way
If you want to know how those 2 folders are formed, here is the detailed way
* Install MinGW and msys by the instructions from their official
website. What I did additionally is when modifying
C:\msys\1.0\etc\profile, I add this line: export CFLAGS="-pipe -O2
-mms-bitfields -march=i686 -mno-cygwin"
* Install gtkmm library
* Install gtkglext library
* download the latest gtkglextmm source code to C:\msys\1.0\home\gtkglextmm
* double click C:\msys\1.0\msys.bat to open the msys shell, and go
to the source by command [cd /home/gtkglextmm]
* install gtkglextmm by command [CXXFLAGS=-mno-cygwin ./configure
--prefix=/mingw && make && make install]
--
不苦不樂正念正智
Gnu.Linux.(Debian|gNewSense).Gnome.(Mozilla|Gmail|Evolution|Scim|Flashplayer)
Microsoft.Windows.(Vista|XP).(QQ|Game|Notepad++) Gcc.Gtkmm.Opengl
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]