Skip to content

fix: Fix Windows compilation errors#3

Open
oxillix wants to merge 1 commit intodirvine:mainfrom
oxillix:fix/windows-compilation
Open

fix: Fix Windows compilation errors#3
oxillix wants to merge 1 commit intodirvine:mainfrom
oxillix:fix/windows-compilation

Conversation

@oxillix
Copy link
Copy Markdown

@oxillix oxillix commented Aug 9, 2025

Summary

This PR fixes compilation errors that occur when building tauri-mcp on Windows.

Changes

  • Update Windows API imports to use GetWindowTextW instead of GetWindowText
  • Fix LPARAM and BOOL type usage in EnumWindows callback function
  • Remove unused WNDENUMPROC import

Problem

The project was failing to compile on Windows with errors related to:

  1. GetWindowText not existing in the Windows API (should be GetWindowTextW)
  2. Type mismatches in the window enumeration callback with LPARAM and BOOL types
  3. Unused imports causing warnings

Testing

  • Successfully builds with cargo build --release on Windows
  • cargo install --path . completes successfully
  • tauri-mcp serve command works as expected

Environment

  • Windows 11
  • Rust 1.70+
  • cargo 1.70+

Fixes build failures when running on Windows systems.

- Update Windows API imports to use GetWindowTextW instead of GetWindowText
- Fix LPARAM and BOOL type usage in EnumWindows callback
- Remove unused WNDENUMPROC import

This fixes compilation errors on Windows where the wrong Windows API
function names were being used and there were type mismatches in the
window enumeration callback function.

Fixes build failures when running 'cargo build --release' on Windows.
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