Skip to content

Windows build broken: MainWindow.cpp exceeds MSVC COFF section limit (needs /bigobj) #1910

@ten9876

Description

@ten9876

Bug

On Windows, src/gui/MainWindow.cpp fails to compile at commit c7395d2 (and later — verified through main as of 0.8.21) with:

MainWindow.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

Cause

MainWindow.cpp has grown large enough — combined with all the Qt MOC-generated symbols and templated code from the new Client* applet/editor modules — that the resulting object file exceeds MSVC's default COFF section limit (~65k sections).

Fix

Add /bigobj to the MSVC compile options in CMakeLists.txt:

if(MSVC)
    target_compile_options(AetherSDR PRIVATE /W3 /Zc:__cplusplus /permissive- /utf-8 /bigobj)

This is the recommended fix from Microsoft for this error. It only changes the object file format (extends the section count limit) and has no runtime impact.

Verified: with this change, MainWindow.cpp compiles cleanly and the full build links successfully on Windows (MSVC 19.44 / Qt 6.8.3).

Environment

  • Windows 10, MSVC 14.44.35207, Qt 6.8.3 (msvc2022_64), CMake 4.3.1, Ninja 1.13.2
  • Branch: main at `c7395d2`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions