[galib] Compile problems solved - galib 2.4.6

R. Frazier rtdoger at hotmail.com
Sun Sep 25 12:07:02 EDT 2005


I posted before that I encountered some problems compiling galib v2.4.6

with MSVC++ 6.0.  I used the project file provided from the site, 
msvcpp5.zip,
but it didn't compile:

Compiling...
GA1DBinStrGenome.C
../..\ga/gaerror.h(19) : error C2061: syntax error : identifier 
'GASourceLocator'
../..\ga/gaerror.h(19) : error C2059: syntax error : ';'
../..\ga/gaerror.h(19) : error C2449: found '{' at file scope (missing 
function header?)
../..\ga/gaerror.h(24) : error C2059: syntax error : '}'
../..\ga/gaerror.h(103) : error C2146: syntax error : missing ')' before 
identifier 'loc'
../..\ga/gaerror.h(103) : error C2061: syntax error : identifier 'loc'
../..\ga/gaerror.h(103) : error C2059: syntax error : ';'
../..\ga/gaerror.h(103) : error C2059: syntax error : ','
../..\ga/gaerror.h(105) : error C2059: syntax error : ')'

etc...

All include files and directories were correctly setup and found, but it
wasn't compiling.  So what I did was rename all source files from .C to .CPP
and it worked.

But my problems were still not over.  I tried compiling one the demos,
and I get several errors:

Linking...
LIBC.lib(crt0dat.obj) : error LNK2005: __cinit already defined in 
libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in 
libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in 
libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __cexit already defined in 
libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in 
libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __C_Exit_Done already defined in 
libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __C_Termination_Done already defined 
in libcmt.lib(crt0dat.obj)

etc...


So, what I had to do under Project Settings | Link | Object/Library modules,
I had to add the line:
libcmt.lib Libc.lib

Tried recompiling, but still got errors:

Linking...
nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator 
new(unsigned int)" (??2 at YAPAXI@Z) already defined in libcmt.lib(new.obj)
nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void 
*)" (??3 at YAXPAX@Z) already defined in libcmt.lib(delete.obj)
tspdemo.exe : fatal error LNK1169: one or more multiply defined symbols 
found
Error executing link.exe.

So I modified the line more:
nafxcw.lib libcmt.lib Libc.lib

Finally! Got the galib library and demo files compiled. Whew!

Did I go around this the wrong way, or is it always this difficult to
compile galib under MSVC++ 6.0?

_________________________________________________________________
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new 
MSN Search! Check it out!



More information about the galib mailing list