RobertoMalatesta / miniz

Automatically exported from code.google.com/p/miniz
0 stars 0 forks source link

mingw32 compilation configuration #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use tdm-mingw32 to compile miniz on win32

What is the expected output? What do you see instead?

Excepting quiet compilation,
got some undefined references instead.

What version of the product are you using? On what operating system?
1.11 / win32

Please provide any additional information below.

My solution:
add 
#define __forceinline inline
#include <time.h> 
at the beginning of the source.

and
mingw32 doesn't have _fseeki64/_ftelli64,
therefore I changed the corresponding macro to ftello64/fseeko64 as 
alternatives. They seems work the same way. I hope :)

      #if defined(__MINGW32__)

         #define MZ_FTELL64 ftello64

         #define MZ_FSEEK64 fseeko64

      #else

         #define MZ_FTELL64 _ftelli64

         #define MZ_FSEEK64 _fseeki64

      #endif

Original issue reported on code.google.com by fermt...@gmail.com on 30 Oct 2011 at 9:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi fermtect - From the sounds of it, there's an issue specifically with mingw32 
which I haven't repro'd yet (because I only have TDM GCC x64 installed). I'll 
fix this on the next release - thanks a lot for the report. (And your fixes 
looks fine, but I didn't get a chance to put them into v1.13.) I'll credit you 
for the fix.

Currently, v1.13 compiles OK with GCC 4.5.0 (tdm64-1), either in x86 mode 
(-m32) or x64 mode. It also compiles with gcc under 32-bit Linux using Ubuntu 
v10, and I'm now including Codeblocks project files. 

-Rich

Original comment by richge...@gmail.com on 20 May 2012 at 4:46

GoogleCodeExporter commented 8 years ago
I installed MinGW32 (TDM GCC 4.6.1) on my system and reproduced this problem. 
This is now fixed in SVN (v1.14). Thanks!

Original comment by richge...@gmail.com on 20 May 2012 at 9:18