I use Cygwin as my build environment as it's more comfortable for me to work with. I build using MinGW (to create a "native" Windows binary, so as not to create a dependency on cygwin1.dll) which is what is providing this interface and translating the Unix/Linux system calls to Windows ones. It's probably safe to say my code would collapse in a heap if I tried to build it on a Microsoft compiler!RichardRussell wrote: ↑Wed 02 Sep 2020, 16:52On Linux, yes, but clock_gettime is not available in Windows (if it seems to be for you, it's probably because you are using cygwin or msys2 rather than the native msvcrt library).
Should TIME be signed or unsigned?
-
- Posts: 23
- Joined: Mon 30 Jul 2018, 20:24
Re: Should TIME be signed or unsigned?
Maintainer, Matrix Brandy BASIC VI and The Distillery
Re: Should TIME be signed or unsigned?
It's not the compiler that matters (I don't use a Microsoft compiler either, I can't anyway because I need the long double data type which it doesn't support) but rather which C run-time library you use.
BBC BASIC for Windows is compiled using GCC, but to keep the runtime engine as small as possible (it's about 82 Kbytes) I don't statically link any libraries but instead use the native system C run-time which comes as standard with Windows: msvcrt.dll.
-
- Posts: 23
- Joined: Mon 30 Jul 2018, 20:24
Re: Should TIME be signed or unsigned?
I was wondering how you got your binaries so small...! Yes, the MinGW C library will make the file rather larger, but I feel that's a small price to pay for the rather better portability I gain from doing so. (Not that I haven't run into some hiccups...)RichardRussell wrote: ↑Thu 03 Sep 2020, 00:24It's not the compiler that matters (I don't use a Microsoft compiler either, I can't anyway because I need the long double data type which it doesn't support) but rather which C run-time library you use.
BBC BASIC for Windows is compiled using GCC, but to keep the runtime engine as small as possible (it's about 82 Kbytes) I don't statically link any libraries but instead use the native system C run-time which comes as standard with Windows: msvcrt.dll.
Maintainer, Matrix Brandy BASIC VI and The Distillery