c++ - zlib compilation error with VxWorks 6.8 -
i trying use gzip compression feature on vxworks 6.8.
vxworks development guide give says,
you can add gzip compression feature system independently of wind river web server adding zlib library files project. so, add files installdir/components/webcli-4.x/target/src/wrn/wm/common/zlib project. use -dwith_zlib compiler flag when build system.
i tried getting build errors
../zlib/zlib_adler32.cpp:21: error: 'z_ulong zlib_z_adler32' redeclared different kind of symbol ../zlib/zlib.h:822: error: previous declaration of 'z_ulong zlib_z_adler32(z_ulong, const z_bytef*, z_uint)' ../zlib/zlib_adler32.cpp:25: error: expected unqualified-id before '{' token c:\windriver\utilities-1.0\x86-win32\bin\make.exe: *** [.../zlib/zlib_adler32.o] error 1
note : files .c extension, changed .cpp , using c++ compiler. functions declared extern "c"
declaration of function can checked here
zextern ulong zexport adler32 of((ulong adler, const bytef *buf, uint len));
any clue?
the problem c old style definition not supported gnu c++
ulong zexport adler32(adler, buf, len) ulong adler; const bytef *buf; uint len; {...}
corrected with ulong zexport adler32(ulong adler, const bytef * buf, uint len) {...}
solved problem.
Comments
Post a Comment