Problem beim Kompilieren von zip mit MinGW
-
Hi Folks!!
Wenn ich die zip-Implementation von Info-Zip versuche mit MinGW in mein Projekt zu kompilieren, erhalte ich folgende Fehlermeldung:
scons: Building targets ...
g++ -c -o zip\zip.o zip\zip.cpp
zip\zip.cpp: In function `lutime_t filetime2timet(FILETIME)`:
zip\zip.cpp:2151: error: integer constant is too large for "long" type
zip\zip.cpp:2827:30: warning: no newline at end of file
scons: *** [zip\zip.o] Error 1
scons: building terminated because of errors.Die Frage ist, wie bekomme ich das kompiliert?? Ich bin ehrlich gesagt a bissl ratlos, weil mit dem VC++ hats anstandslos funktioniert.
Ich mein, ich kann auch net einfach hergehen und dem nen grösseren Datentypen geben. Das wäre net so praktisch, sag ich mal. :pDanke euch.
rya.
Scorcher24
-
mh..
also ich hab aus:lutime_t filetime2timet(const FILETIME ft) { __int64 i = *(__int64*)&ft; return (lutime_t)((i-116444736000000000)/10000000); }
einfach
lutime_t filetime2timet(const FILETIME ft) { __int64 i = *(__int64*)&ft; return (lutime_t)(i-1164447360*10); }
gemacht.
bleibt sich ja gleichund funzt auch
-
Danke für deine Antwort!! Ich habe dann doch mal den Autor angemailt und der hat mir auch ne Nachricht geschickt:
The problem is because MinGW is weird about the __int64 datatype. To fix it, change __int64 into LONGLONG, and put the suffix LL at the end of the integer constants in that function.
So geht's natürlich auch.
rya.
Scorcher24