Menu

#22 Does not cross build under x86_64 system

v1.0_(example)
open
nobody
None
5
2022-03-21
2022-03-21
Rob Norris
No

This is cross building on openSUSE tumbleweed on x86_64 with gcc version 10.2.1 + x86_64-w64-mingw32-gcc version 9.2.0

First failure is in src/julian_day.c

In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/crtdefs.h:10,
from /usr/x86_64-w64-mingw32/sys-root/mingw/include/time.h:9,
from julian_day.c:23:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/corecrt.h:133:2: error: #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
133 | #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
| ^

Then there is the same issue present in lntest/test.c

I was able to fix it (for both) files by explicitly avoiding using "_USE_32BIT_TIME_T" on MINGW 64bit systems like this:

#if defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#define _USE_32BIT_TIME_T
#endif  //__MINGW__
-->
#if defined(__MINGW__) && defined(__MINGW32__)
#define _USE_32BIT_TIME_T
#endif  //__MINGW__

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.