On 20-Mar-2014 15:38, Johan Engelen wrote:
Hello David, in libuemf/uemf_utf.c, there is
/** \cond */ /* iconv() has a funny cast on some older systems, on most recent ones it is just char **. This tries to work around the issue. If you build this on another funky system this code may need to be modified, or define ICONV_CAST on the compile line(but it may be tricky). */ #ifdef SOL8 #define ICONV_CAST (const char **) #endif //SOL8 #if !defined(ICONV_CAST) #define ICONV_CAST (char **) #endif //ICONV_CAST /** \endcond */
An example of the macro usage: ... status = iconv(conv, ICONV_CAST &src, &srclen, &dst, &dstlen); ...
This generates a warning because, at least on Windows, iconv expects a (const char **) and gcc complains about an unsafe cast.
It is a pain writing iconv code that compiles cleanly everywhere. However, on the systems I have in hand that is the case.
Windows:
gcc -DWIN32 -std=c99 -pedantic -Wall -g -o reademf reademf.c uemf.c uemf_endian.c \ uemf_utf.c uemf_print.c upmf.c upmf_print.c -lm -liconv
No warning generated (gcc 4.6.2 on mingw).
Linux is also clean (ubuntu 12.04LTS, gcc 4.6.3):
gcc -std=c99 -pedantic -Wall -g -o reademf reademf.c uemf.c uemf_endian.c uemf_utf.c \ uemf_print.c upmf.c upmf_print.c -lm
Solaris 8 and 9 (irrelevant for Inkscape) also compile cleanly with the appropriate compile line.
Please send the compiler line you used and the compiler version information. If it was on windows, was it missing the -DWIN32?
Thanks,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech