Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW support IME #2590

Closed
actboy168 opened this issue May 29, 2019 · 6 comments
Closed

MinGW support IME #2590

actboy168 opened this issue May 29, 2019 · 6 comments

Comments

@actboy168
Copy link
Contributor

MingGW disabled IME support, because #738. I don't think MinGW can't use imm.h/imm32.lib.

I want MinGW to enable IME support, only by modifying imgui.cpp.

Can you add a macro IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS to enable IME support?

@ocornut
Copy link
Owner

ocornut commented May 29, 2019

Please design and submit the PR that could make it work with MinGW. I don't know how MinGW works and how Microsoft IME api can be used with it.

@actboy168
Copy link
Contributor Author

I think it only needs to remove !defined(__GNUC__) and add ldflag -limm32 to the link.

imgui/imgui.cpp

Line 9699 in cb7ba60

#if defined(_WIN32) && !defined(__GNUC__) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)

@ocornut
Copy link
Owner

ocornut commented May 29, 2019

You just said above "I don't think MinGW can't use imm.h/imm32.lib."

@actboy168
Copy link
Contributor Author

Eh, I mean MinGW can use imm.h / imm32.lib.

@ocornut
Copy link
Owner

ocornut commented Feb 22, 2021

@actboy168 I apologies it took me so long to review this. A few days ago I was setting up some better mingw build script here and looked at this (previously was mostly running mingw builds without backends). You were absolutely right. I merged the fix here edf135c
Thank you again!

@ocornut ocornut closed this as completed Feb 22, 2021
ocornut pushed a commit that referenced this issue Feb 24, 2021
ocornut added a commit that referenced this issue Jul 8, 2021
… Studio compilers (MinGW etc.) (#2590, #738, #4185, #4301)

Enable with '#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS' for those compilers. Undo change from 1.82.
@ocornut
Copy link
Owner

ocornut commented Jul 8, 2021

I pushed 30d164e to undo the change made in 1.82 to enable IME support by default with non-Visual Studio compilers, since in master this is part of the core library rather than the win32 backend it seems reasonable to require explicit enable.
Non Visual Studio users who want IME support in their app need to compile with #define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants