Skip to content

Fix Windows wxWidgets build errors and warnings - #220

Open
neoct wants to merge 11 commits into
AZO234:wx_alphafrom
neoct:fix/windows-wx-mingw-build
Open

Fix Windows wxWidgets build errors and warnings#220
neoct wants to merge 11 commits into
AZO234:wx_alphafrom
neoct:fix/windows-wx-mingw-build

Conversation

@neoct

@neoct neoct commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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=3
  • Build the wx target:

    cmake --build build-wx-mingw \
      --target wxnp21kai --parallel 2
  • Built the wxnp21kai target with MinGW.

  • Confirmed successful linking and executable generation.

  • Confirmed that the final build completed without compiler warnings.

image

--
ひとまず、現状のでwxWidgets + Windows が動くようになりました。おまけでWarningのところも対応しています。

PS 雑談
個人的には、 VC++のMFC 使わされそうになって、ほかのToolkitを推薦して回避した経験があります。😀
なので、wxWidgets に出会ったときは、記法が似たにおいがして敬遠していました(だいぶ前に個人的にやろうと思って挫折)。今だと、そうでもなくもかけそうですねかね。
Qtよりも地味で保守的なイメージですが、OSに溶け込む点がよさそうですね。

neoct added 11 commits August 24, 2026 22:07
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>
@neoct

neoct commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@AZO234 今回、エラーや警告をつぶす過程で、メモリのover-read のバグが見つかりました 。
PR #221 のほうで対応しています。これら両方とも独立にマージ適用可能です。

@neoct

neoct commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

@AZO234
補足)
エミュレータ内で一部のキーボードのキーが別のキーを押したような挙動になるのに気づきました。
これは、wxWidgets 版に共通する不具合でしょうかね。
(なにかPC98のキーにマッピングする際、特別なことをする必要があるとか?)

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.

1 participant