Skip to content

fix(native): support Windows dynamic loading#2

Merged
RestartFU merged 1 commit into
bedrock-gophers:masterfrom
MymaQc:fix/windows-native-bridge
Jul 15, 2026
Merged

fix(native): support Windows dynamic loading#2
RestartFU merged 1 commit into
bedrock-gophers:masterfrom
MymaQc:fix/windows-native-bridge

Conversation

@MymaQc

@MymaQc MymaQc commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds Windows support to the native bridge dynamic loading layer.

Why

internal/native/bridge.c currently includes dlfcn.h directly, which is not available on Windows. As a result, the project fails to compile on Windows with errors like:

fatal error: dlfcn.h: No such file or directory

This change keeps the existing POSIX dlfcn.h behavior for Unix-like platforms, while adding a small _WIN32 compatibility layer using the native Windows APIs:

  • LoadLibraryA
  • GetProcAddress
  • FreeLibrary
  • GetLastError / FormatMessageA

@RestartFU RestartFU merged commit 923c030 into bedrock-gophers:master Jul 15, 2026
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