Fix Windows wxWidgets build errors and warnings - #220
Open
neoct wants to merge 11 commits into
Open
Conversation
The Windows MinGW wxWidgets build used POSIX-only communication backends and directory APIs, and could not reliably resolve the user configuration directory. Select the Windows-compatible SDL communication backends, use _mkdir on Windows, fall back from HOME to USERPROFILE, and link winmm for Windows MIDI support. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Verified wxnp21kai builds successfully on Windows with MinGW. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Use uintptr_t for the host-width pointer conversion step while preserving the existing UINT32 interface. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Include winsock2.h before windows.h and avoid redeclaring Windows performance-counter APIs on Windows builds. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Avoid redefining platform macros already supplied by the Windows and build headers. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Remove the unused bitmap helper and mark the IA32-only control lookup as intentionally unused. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Use field-designated initializers so conditional video-filter fields retain their intended values. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Keep the SoftFloat little-endian definition when it is not already supplied by the platform headers. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Avoid redefining LITTLEENDIAN after the platform headers have already supplied it. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Use designated initializers for optional members so SUPPORT_DEBUGSS and SUPPORT_VIDEOFILTER changes do not shift subsequent fields. Unspecified members are initialized to zero by the C language rules. Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Signed-off-by: NeoClassic Tech <302284179+neoct@users.noreply.github.com>
Contributor
Author
Contributor
Author
|
@AZO234 |
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.
Overview
Fix build errors and compiler warnings in the Windows wxWidgets
(MinGW) target.
The wxnp21kai target now builds successfully without errors and warnings.
Testing
Configure the Windows wxWidgets build:
cmake -S . -B build-wx-mingw \ -DBUILD_WX=ON -DBUILD_X=OFF -DUSE_SDL=3Build the wx target:
Built the
wxnp21kaitarget with MinGW.Confirmed successful linking and executable generation.
Confirmed that the final build completed without compiler warnings.
--
ひとまず、現状のでwxWidgets + Windows が動くようになりました。おまけでWarningのところも対応しています。
PS 雑談
個人的には、 VC++のMFC 使わされそうになって、ほかのToolkitを推薦して回避した経験があります。😀
なので、wxWidgets に出会ったときは、記法が似たにおいがして敬遠していました(だいぶ前に個人的にやろうと思って挫折)。今だと、そうでもなくもかけそうですねかね。
Qtよりも地味で保守的なイメージですが、OSに溶け込む点がよさそうですね。