Skip to content

fix FRED2 MFC linkage when building qtFRED#7442

Merged
Goober5000 merged 1 commit intoscp-fs2open:masterfrom
Goober5000:7334_followup
May 8, 2026
Merged

fix FRED2 MFC linkage when building qtFRED#7442
Goober5000 merged 1 commit intoscp-fs2open:masterfrom
Goober5000:7334_followup

Conversation

@Goober5000
Copy link
Copy Markdown
Contributor

PR #7334 caused an unintended side effect when building both FRED and QtFRED. With QtFRED enabled, FRED2 sources were compiled with _AFXDLL defined while still linking against static MFC, causing a crash on startup. To fix this, keep the conditionals in sync between cmake/toolchain-msvc.cmake and fred2/CMakeLists.txt.

Also, do not explicitly add static MFC libraries if we are using dynamic linking.

PR scp-fs2open#7334 caused an unintended side effect when building both FRED and QtFRED.  With QtFRED enabled, FRED2 sources were compiled with _AFXDLL defined while still linking against static MFC, causing a crash on startup.  To fix this, keep the conditionals in sync between cmake/toolchain-msvc.cmake and fred2/CMakeLists.txt.

Also, do not explicitly add static MFC libraries if we are using dynamic linking.
@Goober5000 Goober5000 added fix A fix for bugs, not-a-bugs, and/or regressions. build An issue related to the build systems labels May 8, 2026
@Goober5000 Goober5000 added this to the Release 26.0 milestone May 8, 2026
@Goober5000 Goober5000 merged commit 6885bdc into scp-fs2open:master May 8, 2026
20 checks passed
@Goober5000 Goober5000 deleted the 7334_followup branch May 8, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build An issue related to the build systems fix A fix for bugs, not-a-bugs, and/or regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants