[galib] Compiling GALib under Visual C++ 2003 (Version 7)

Kevin Druhan kevin.druhan at Dal.Ca
Mon Jan 30 15:04:50 EST 2006

I was able to successfully compile under VC++ 2003 by doing the following:

First, download and unzip the file http://lancet.mit.edu/ga/dist/galib246.zip to
a directory on your disk (let's say C:\).

In Visual Studio,

1) File->Create Blank Solution
2) Select Visual C++ Projects -> Win32 Console Project.
3) Enter a name for the project (let's say you call it TEST and put it in C:\).
4) Click Application Settings and check the Empty Project box (leave 'Console
application' radio button selected).
5) Click Finish.
6) Copy all of the .c and .h files from C:\galib246\ga to your project directory
\TEST where the test.sln and other files are located.
7) Copy one of the example files from C:\galib246\examples (start with ex1.c) to
7) Rename all of the .c files to .cpp and the .h files to .hpp. This is easiest
by opening a command window (Start button->Run, type in 'cmd'). Then type

cd\test <enter>
ren *.c *.cpp <enter>
ren *.h *.hpp <enter>

8) Right-click on the Source Files folder in the Solution Explorer (left-hand
side of screen back in VC++). Select Add->Add Existing Item. Select all of the
.hpp and .cpp files in your project directory.
9) Compile (F7)!

I'm sure this is not the best way to compile, but given the huge number of posts
on this listserv about how to even get GALib running under Windows, I thought
this might help some people get started.

Kevin Druhan
Msc Computer Science
Dalhousie University, Nova Scotia, Canada

More information about the galib mailing list