Been spending the time at home re-writing Brix in C.
The variables involved are declared as extern int32
On Thursday, 26 March 2020 13:57:32 UTC, use...@garethlock.com wrote:
Been spending the time at home re-writing Brix in C.
The variables involved are declared as extern int32
Are they declared somewhere once (and only once) without extern?
If not - that's the problem.
The extern's tell the compiler that a variable exists elsewhere and
of what type, and the linker fixes up the references to it. But one
of the source files needs to have the variables without extern so
that the variable exists in memory,
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 221:22:03 |
Calls: | 6,623 |
Calls today: | 5 |
Files: | 12,171 |
Messages: | 5,318,094 |