[galib] Help using GALib: compiling the library

matthew wall mwall at oculustech.com
Wed Jul 20 08:10:25 EDT 2005


On 20 Jul 2005, at 03:01, #SAWHNEY ADITI# wrote:

> Hey,
>
> I have used galib once prior and then i had run the makefile and  
> included all the ".o" files of galib in my C++ project and run my  
> program and itw orked.
> i havenow written another small GA but when i compile it i get the  
> following errors :
> ===================
> ompiling...
> main.C
> w:\latest\gaextra\galib246\ga\gaid.h(29) : error C2061: syntax  
> error : identifier 'GAID'
> w:\latest\gaextra\galib246\ga\gaid.h(29) : error C2059: syntax  
> error : ';'
> w:\latest\gaextra\galib246\ga\gaid.h(29) : error C2449: found '{'  
> at file scope (missing function header?)
> w:\latest\gaextra\galib246\ga\gaid.h(56) : error C2059: syntax  
> error : '}'
> c:\program files\microsoft visual studio\vc98\include\eh.h(32) :  
> fatal error C1189: #error :  "eh.h is only for C++!"
> Error executing cl.exe.
> main.obj - 5 error(s), 0 warning(s)
> ==============================
> can anyone help me iwth this?
>
> yours sincerely,
> aditi


aditi,

be sure that you tell the compiler to behave as a c++ compiler, not a  
c compiler.  with ms vcpp this is the /TP switch (i do not know the  
corresponding checkbox when using visual studio).

m



More information about the galib mailing list