From aad39ac3bde3a3d53d105c794136816e0cc7d56f Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Wed, 22 Jul 2026 08:54:33 -0300 Subject: [PATCH] declare gFullBaseTileValues extern like every other global here tiledef.h is included by 1900 objects, and each one was compiling a tentative definition of gFullBaseTileValues rather than a declaration of it. The array is defined once in TileDat.cpp, and every other global in the same block is already declared extern; this one was missed. MSVC accepts it and merges the tentative definitions, so nothing was visibly broken. A conforming front end rejects it outright: tiledef.h(180,12): error: definition of variable with array type needs an explicit size or an initializer which is what turned it up. Verification: ninja -C build -k 0, all four applications link. Co-Authored-By: Claude Opus 4.8 --- TileEngine/tiledef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TileEngine/tiledef.h b/TileEngine/tiledef.h index 0ca729264..ac7671634 100644 --- a/TileEngine/tiledef.h +++ b/TileEngine/tiledef.h @@ -177,7 +177,7 @@ typedef struct // Globals used extern TILE_ELEMENT gTileDatabase[ NUMBEROFTILES ]; extern UINT16 gTileDatabaseSize; -UINT8 gFullBaseTileValues[]; +extern UINT8 gFullBaseTileValues[]; extern UINT16 gNumTilesPerType[ NUMBEROFTILETYPES ]; extern UINT16 gTileTypeStartIndex[ NUMBEROFTILETYPES ]; extern STR gTileSurfaceName[NUMBEROFTILETYPES];