Skip to content

Conversation

nofishleft
Copy link

@nofishleft nofishleft commented Dec 24, 2024

CMAKE_BUILD_TYPE: Debug
CMake: 3.30.5

Windows + MSVC 17.0 + Debug error:

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

Windows + MinGW 11.0 w64 + Debug:

Appeared to hang, 10+ min and hadn't finished compiling.

Fix:

Adding the bigobj flag fixed the issues with both msvc and mingw.
Added the fix for clang-cl as well, but haven't tested it.

Sources:

Sources for MSVC error/flag:
Fatal Error C1128
/bigobj (Increase Number of Sections in .Obj file)

Sources for MinGW flag:
Mingw-w64: How to fix “File too big/too many sections”
GCC equivalent of MS's /bigobj

Sources for clang-cl flag:
How to add /bigobj switch to clang with ms code gen?

Sources for determining compiler used:
MSVC
MinGW
clang-cl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants