Skip to content

Re-enable mfc sample#23963

Closed
LegalizeAdulthood wants to merge 1 commit intowxWidgets:masterfrom
LegalizeAdulthood:develop
Closed

Re-enable mfc sample#23963
LegalizeAdulthood wants to merge 1 commit intowxWidgets:masterfrom
LegalizeAdulthood:develop

Conversation

@LegalizeAdulthood
Copy link
Contributor

I was able to build and run the sample without issues.

@vadz
Copy link
Contributor

vadz commented Oct 14, 2023

I think the problem here is that it only builds with MSVS and only when MFC is available (which is not always the case any more). So we'd need to test that MSVS is being used (probably simple) and ideally also that MFC is available (e.g. by checking for one of its headers?), otherwise this will break the build for all MinGW users.

@Kumazuma
Copy link
Contributor

it is possible with MSVC CMake Variable to check compiler is Visual Studio. MFC base header file is afxwin.h

@vadz vadz added work needed Too useful to close, but can't be applied in current state MSW build Any build issue (with or without CMake) labels Oct 21, 2023
@LegalizeAdulthood
Copy link
Contributor Author

Checking MSVC is probably the right thing to do, I'll look at a fix.

@vadz
Copy link
Contributor

vadz commented May 10, 2025

Testing for MSVC is simple, but testing that MFC is available is not, so somebody would need to do it. For now I'm closing it as it can't be applied as is.

@vadz vadz closed this May 10, 2025
@PBfordev
Copy link
Contributor

PBfordev commented May 10, 2025

Using FindMFC and adding the MFC sample only when MFC_FOUND would seem an obvious solution but I cannot test it and using it could add unwanted dependencies to projects (but I don't see anything like that there).

MaartenBent added a commit to MaartenBent/wxWidgets that referenced this pull request May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Any build issue (with or without CMake) MSW work needed Too useful to close, but can't be applied in current state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants