W
wxforecaster
As alluded to in my post yesterday, I'm trying to compile a common C utility
in Windows.
It's only reference is to zlib.h, which needs zconf.h and in turn libz.a
On Unix I've compiled this with success by running: gcc -lz -o foo.exe foo.c
(where -lz is a link to 'z' or libz.a)
I've placed zlib.h and zconf.h in the VC include folder, and libz.a and
libz.so in the lib folder.
When I run: cl foo.c
from the VS2005 command line tool, I get the following errors (which are the
same errors I would receive on Unix without linking to the libz.a library by
the -lz commnd line argument). I was under the impression that cl called the
linker automatically, so what am I doing wrong here?
/out:foo.exe
foo.obj
foo.obj : error LNK2019: unresolved external symbol _inflate referenced in
function _main
foo.obj : error LNK2019: unresolved external symbol _inflateInit_ referenced
in function _main
foo.exe : fatal error LNK1120: 2 unresolved externals
Thanks in advance!
Evan
in Windows.
It's only reference is to zlib.h, which needs zconf.h and in turn libz.a
On Unix I've compiled this with success by running: gcc -lz -o foo.exe foo.c
(where -lz is a link to 'z' or libz.a)
I've placed zlib.h and zconf.h in the VC include folder, and libz.a and
libz.so in the lib folder.
When I run: cl foo.c
from the VS2005 command line tool, I get the following errors (which are the
same errors I would receive on Unix without linking to the libz.a library by
the -lz commnd line argument). I was under the impression that cl called the
linker automatically, so what am I doing wrong here?
/out:foo.exe
foo.obj
foo.obj : error LNK2019: unresolved external symbol _inflate referenced in
function _main
foo.obj : error LNK2019: unresolved external symbol _inflateInit_ referenced
in function _main
foo.exe : fatal error LNK1120: 2 unresolved externals
Thanks in advance!
Evan