On 10/04/2025 16:29, bart wrote:
Huh? Do you really want to go down that path of analysing exactly what
gcc is and isn't? 'gcc' must be the most famous C compiler on the planet!
Everyone else already knows gcc is a compiler. It certainly does not
have a "windows.h" header. It is that simple.
Yes we all know that 'gcc' /now/ stands for 'gnu compiler collection' or
something, and that it is a driver program for a number of utilities.
But this is a C group which has informally mentioned 'gcc' for decades
across tens of thousands of posts, but you had to bring it up now?
Any viable C compiler that targets Windows, gcc included, needs to
provide windows.h.
A C /implementation/ targeting Windows is likely to have some >Windows-specific headers packaged with it.
Yes, and we know what such code looks like, with long chains of
mysterious arguments, many of which are zeros or NULLS:
hwnd = CreateWindowEx(
0,
szAppName,
"Hello, world!",
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
300,
100,
400,
400,
NULL,
NULL,
0,
NULL);
Even without named arguments, just default values, but allowing trailing
arguments only to be omitted, those last 4 arguments can be dropped.
It is up to the C programmer to write this in a clear and maintainable
way. I agree that named parameters could make that task easier.
Let's not pretend that MS's API's are good examples of clear design!
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (1 / 15) |
Uptime: | 159:33:11 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,056 |
Messages: | 6,416,491 |