Allow building with MinGW on Windows.

pull/4/head
ruevs 2015-10-27 09:34:13 +02:00 committed by whitequark
parent 28166e6200
commit 922a6260d7
2 changed files with 11 additions and 0 deletions

View File

@ -111,7 +111,13 @@ and point cmake-gui to the source tree and that directory. Press
"Configure" and "Generate", then open `build\solvespace.sln` with
Visual C++ and build it.
Alternatively it is possible to build SolveSpace using [MinGW][mingw].
Run cmake-gui as described above but after pressing "Configure" select
the "MSYS Makefiles" generator. After that, run `make` in the `build`
directory; make sure that the MinGW compiler is in your `PATH`.
[cmakewin]: http://www.cmake.org/download/#latest
[mingw]: http://www.mingw.org/
License
-------

View File

@ -693,8 +693,13 @@ int64_t SolveSpace::GetMilliseconds(void)
int64_t SolveSpace::GetUnixTime(void)
{
#ifdef __MINGW32__
time_t ret;
time(&ret);
#else
__time64_t ret;
_time64(&ret);
#endif
return (int64_t)ret;
}