Draft
Fix Windows MSVC iostream linking failure in BeamLatticeVoxelAcceleration tests#9
Conversation
Co-authored-by: 3dJan <56254096+3dJan@users.noreply.github.com>
Co-authored-by: 3dJan <56254096+3dJan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] 3dJan/prepare_1_2_14 fails to build on windows due to missing symbols
Fix Windows MSVC iostream linking failure in BeamLatticeVoxelAcceleration tests
Sep 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a Windows MSVC build failure where the linker could not resolve
std::basic_ostreamsymbols when buildingBeamLatticeVoxelAcceleration_tests.cpp. The error manifested as:Root Cause
The issue was caused by conflicting linker subsystem flags in the Windows build. The build logs showed both
/SUBSYSTEM:WINDOWSand/subsystem:consolebeing applied simultaneously:This invalid configuration prevented proper iostream symbol linkage. The main CMakeLists.txt sets
CMAKE_EXE_LINKER_FLAGSto include/SUBSYSTEM:WINDOWSglobally, but test executables require console I/O forstd::coutoperations used extensively in the test suite.Solution
Fixed subsystem conflict: Override the global Windows subsystem setting specifically for test executables:
Explicit C++20 standard: Ensure unit tests match integration test configuration:
Complete dependency chain: Added all required source files for the BeamLatticeVoxelAcceleration functionality:
BeamLatticeVoxelAcceleration.h/cpp- main voxel acceleration implementationBeamLatticeVoxelAccelerationReference.h/cpp- reference implementation for testingBeamLatticeResource.h/cppandBeamBVH.h/cpp- required dependenciesThe issue was specific to this test file because it combines complex template usage (
measureExecutionTime<Func>), extensive iostream formatting operations, C++17 structured bindings, and heavystd::coutusage that triggered more template instantiations than simpler test files.Fixes #8.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.