Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw32 compilation configuration #2

Closed
GoogleCodeExporter opened this issue Apr 26, 2015 · 3 comments
Closed

mingw32 compilation configuration #2

GoogleCodeExporter opened this issue Apr 26, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant