From: Milind G. <mil...@gm...> - 2014-04-19 00:55:02
|
Hi, I have been trying to compile librsync as a dynamic library on windows using code::blocks. I get the following errors: -------------- Build: Debug in librsync (compiler: GNU GCC Compiler)--------------- mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\base64.c -o obj\Debug\base64.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\buf.c -o obj\Debug\buf.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\checksum.c -o obj\Debug\checksum.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\command.c -o obj\Debug\command.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c -o obj\Debug\delta.o C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c: In function 'rs_delta_s_scan': C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c:168:31: warning: pointer targets in passing argument 2 of 'RollsumUpdate' differ in signedness [-Wpointer-sign] job->block_len); ^ In file included from C:\Users\milindgupta\Documents\librsync-0.9.7\job.h:24:0, from C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c:77: C:\Users\milindgupta\Documents\librsync-0.9.7\rollsum.h:37:6: note: expected 'const unsigned char *' but argument is of type 'char *' void RollsumUpdate(Rollsum *sum,const unsigned char *buf,unsigned int len); ^ C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c: In function 'rs_findmatch': C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c:266:9: warning: pointer targets in passing argument 2 of 'RollsumUpdate' differ in signedness [-Wpointer-sign] RollsumUpdate(&job->weak_sum,job->scoop_next+job->scoop_pos,*match_len); ^ In file included from C:\Users\milindgupta\Documents\librsync-0.9.7\job.h:24:0, from C:\Users\milindgupta\Documents\librsync-0.9.7\delta.c:77: C:\Users\milindgupta\Documents\librsync-0.9.7\rollsum.h:37:6: note: expected 'const unsigned char *' but argument is of type 'char *' void RollsumUpdate(Rollsum *sum,const unsigned char *buf,unsigned int len); ^ mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\emit.c -o obj\Debug\emit.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\fileutil.c -o obj\Debug\fileutil.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\hex.c -o obj\Debug\hex.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\isprefix.c -o obj\Debug\isprefix.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\job.c -o obj\Debug\job.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\mdfour.c -o obj\Debug\mdfour.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\mksum.c -o obj\Debug\mksum.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\msg.c -o obj\Debug\msg.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\netint.c -o obj\Debug\netint.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\patch.c -o obj\Debug\patch.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\popt\findme.c -o obj\Debug\popt\findme.o mingw32-gcc.exe -Wall -g -DBUILD_DLL -I..\..\librsync-0.9.7 -I..\PCbuild -I..\popt -c C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c -o obj\Debug\popt\popt.o C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:10:15: error: conflicting types for 'strerror' static char * strerror(int errno) { ^ In file included from c:\mingw\include\io.h:235:0, from c:\mingw\include\fcntl.h:37, from C:\Users\milindgupta\Documents\librsync-0.9.7\popt\system.h:7, from C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:5: c:\mingw\include\string.h:59:39: note: previous declaration of 'strerror' was here _CRTIMP char* __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */ ^ In file included from C:\Users\milindgupta\Documents\librsync-0.9.7\popt\system.h:15:0, from C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:5: C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c: In function 'strerror': C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:11:16: warning: '_sys_nerr' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern int sys_nerr; ^ C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:12:19: warning: '_sys_errlist' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern char * sys_errlist[]; ^ C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c: In function 'execCommand': C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:270:5: warning: implicit declaration of function 'execvp' [-Wimplicit-function-declaration] execvp(argv[0], (char *const *)argv); ^ C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c: In function 'poptStrerror': C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:720:2: warning: passing argument 1 of 'strerror' makes pointer from integer without a cast [enabled by default] return strerror(errno); ^ C:\Users\milindgupta\Documents\librsync-0.9.7\popt\popt.c:10:15: note: expected 'int * (*)()' but argument is of type 'int' static char * strerror(int errno) { ^ Process terminated with status 1 (0 minute(s), 9 second(s)) 1 error(s), 6 warning(s) (0 minute(s), 9 second(s)) Please can someone help me fix these? Thanks, Milind |