Toolchain: VS2022 (v143) is the build of record -- /FORCE:UNRESOLVED retired
The v143 linker refuses to emit an image with unresolved externals even under /FORCE, so the dead offline-tool ladders in mech3.cpp (Mech::CreateSubsystemStream / SubsystemDefaultData -- never called at runtime, resources ship prebuilt in BTL4.RES) are compiled out behind BT412_OFFLINE_TOOLS (default off). The exe links /FORCE:MULTIPLE only: a genuinely unresolved symbol is now a hard link error instead of a hidden runtime AV. No other source changes needed for v143. Verified: clean build; solo DEV.EGG runs; two-instance loopback MP via btconsole.py -- mesh forms, mission runs both sides, master + replicant tick in each world. (Phase 1 of docs/BT412-ROADMAP.md) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-4
@@ -322,10 +322,12 @@ target_link_libraries(btl4 PRIVATE
|
||||
"${DXSDK}/Lib/x86/dxguid.lib"
|
||||
"${DXSDK}/Lib/x86/DxErr.lib"
|
||||
winmm dbghelp shell32 user32 gdi32 ole32 ws2_32)
|
||||
# /FORCE: the 1995 headers define free funcs/globals without inline/extern, so
|
||||
# identical symbols land in every TU (~124 LNK2005); MULTIPLE keeps the first.
|
||||
# UNRESOLVED tolerates the dead offline-tool factory in mech3.cpp. See docs.
|
||||
target_link_options(btl4 PRIVATE /FORCE)
|
||||
# /FORCE:MULTIPLE: the 1995 headers define free funcs/globals without
|
||||
# inline/extern, so identical symbols land in every TU (~124 LNK2005);
|
||||
# MULTIPLE keeps the first. UNRESOLVED is gone (BT412/v143): the dead
|
||||
# offline-tool factory in mech3.cpp is neutralized behind BT412_OFFLINE_TOOLS,
|
||||
# so any unresolved external is now a REAL link error, not a runtime AV.
|
||||
target_link_options(btl4 PRIVATE /FORCE:MULTIPLE)
|
||||
|
||||
# Copy the third-party runtime DLLs next to the built exe.
|
||||
add_custom_command(TARGET btl4 POST_BUILD
|
||||
|
||||
Reference in New Issue
Block a user