[galib] step by step compilation instructions for visual C++ 2005

Eyal eyaler at yahoo.com
Tue Aug 15 11:07:49 EDT 2006

so you have finally decided to upgrade to VC++ 2005
and use those cool new optimization options. but alas
you quickly find out that first time linking is not a
very different experience from the annual visit to
your not-so-favorite garage. Your mechanic starts
blubbering about the newly alleged faults in your car,
of which its internal mechanisms you understand
nothing. Your mind screams inside your head BUT IT WAS
WORKING FINE... well maybe linking is less expensive
(that is, depending how you got your VC++ 2005), but
surely no less frustrating. anyways, may car is in the
garage so i had some hours to spend.
personally i believe GALIB should be distributed with
a vc++ project (solution) file and perhaps even with a
compiled lib file.
in the mean time follow these steps for a clean
compilation of GALIB 2.46 on VC++ 2005:

1. file -> new -> project. choose win32 console
application. put in a name (ga) and a location
(c:\galib). ok->next->choose static library. uncheck
pre-compiled headers->finish.

2. all *.h and *.c files should be in the directory
c:\galib\ga (the last subdirectory must be named ga)

3. project -> add existing item -> select all *.h and
*.c files

4. in the solution explorer (the box on the left).
select all *.c files. right
as->compile as c++ code (/TP). do this for both
release and debug configurations. it is NOT sufficient
to change this for the project itself, but this must
be done for all *.c files specifically.

6. in gaconfig.h, find the line:
// #pragma warning (disable : 4244)    // int-to-float

remove the above initial remark sign (//) to prevent
double to float warnings, and add:
#pragma warning(disable:4996)
(this is instead of #define _CRT_SECURE_NO_DEPRECATE
which is not sufficient)

7. while in the source window: project->ga
properties->general->c/c++->code generation->runtime
library->set this to be the same as in your main
project which will use the ga.lib for both release and

8. project->ga properties->general->c/c++->additional
include directories->c:\galib, for both release and

9. this is a good time to set your favorite
optimization options

10. project->build solution

good times - the war is over

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the galib mailing list