Hi Peter, would you like to create a patch ? I bet the other windows users would be happy!
https://www.github.com/oetiker/rrdtool-1.x cheers tobi Today Peter wrote: > Hi, > > I compiled successfully rrdtool-1.4.8 with Visual Studio 2013 after solving > the following 3 issues. At first pay attention to WIN32-BUILD-TIPS.txt and > load / copy all libraries. > There are 3 issues left: > 1. ============== > use a folder without spaces! > Otherwise later come an post build event error: > > Error 20 error MSB3073: The command "copy > c:\Users\Peter\Documents\Visual Studio > 2013\rrdtool-1.4.8\win32\\..\contrib\bin\freetype6.dll > c:\Users\Peter\Documents\Visual Studio 2013\rrdtool-1.4.8\win32\Debug\\ ... > > 2. ==================== > Error 2 error C2556: 'int round(double)' : overloaded function > differs only by return type from 'double round(double)' > > Problem: > in math.h is defined > _CRTIMP double __cdecl round(_In_ double _X); > > > Solution: > comment out: > //__inline int round(double a ){int x = (a + 0.5); return x;} > > possible slower as inline, but in c++ is not allowed overloaded function > differs only by return.. Is there a faster solution? > > 3. ======================= > Error 14 error C1189: #error : "Don't know how to deal with TIME_T > other than 4 or 8 bytes" c:\Users\Peter\Documents\Visual Studio > 2013\rrdtool-1.4.8\src\rrd_restore.c 235 1 rrdlib > > solution from answer > http://stackoverflow.com/questions/16962257/failing-to-compile-rrd > in rrd_restore.c > replace > #if SIZEOF_TIME_T == 4 > temp = strtol(( char *)text,NULL, 0); > #elif SIZEOF_TIME_T == 8 > temp = strtoll(( char *)text,NULL, 0); > #else > #error "Don't know how to deal with TIME_T other than 4 or 8 bytes" > #endif > by > #ifndef WIN32 > #if SIZEOF_TIME_T == 4 > temp = strtol(( char *)text,NULL, 0); > #elif SIZEOF_TIME_T == 8 > temp = strtoll(( char *)text,NULL, 0); > #else > #error "Don't know how to deal with TIME_T other than 4 or 8 bytes" > #endif > #else > temp = strtoll(( char *)text, NULL, 0); > #endif > > in rrd_create.c: > replace > #include "../rrd_config.h" > by > > #ifndef WIN32 > #include "../rrd_config.h" > #endif > > After this changes I can compile it without errors and 110 warnigs. > > Peter > > > > > > -- > View this message in context: > http://rrd-mailinglists.937164.n2.nabble.com/Compile-rrdtool-1-4-8-in-Visual-Studio-2013-tp7582052.html > Sent from the RRDtool Developers Mailinglist mailing list archive at > Nabble.com. > > _______________________________________________ > rrd-developers mailing list > rrd-developers@lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland www.oetiker.ch t...@oetiker.ch +41 62 775 9902 _______________________________________________ rrd-developers mailing list rrd-developers@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers