digitalmars.D.learn - MessageBoxA linking error
- bauss (9/12) Dec 11 2024 Whenever I try to use MessageBoxA then I get a linking error that
- Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= (6/18) Dec 11 2024 I have no idea whether it should be automatically linked with it,
- bauss (3/25) Dec 11 2024 pragma(lib, "user32") worked. Thank you.
Whenever I try to use MessageBoxA then I get a linking error that the symbol cannot be found. I am importing core.sys.windows.windows. What else am I missing? The exact error: ``` lld-link: error: undefined symbol: MessageBoxAError: linker exited with status 1 ```referenced by ...\source\client\source\main.d:24 ...\~master\build\application-debug-FMqG_QyKCCZMqpWApQaoww\....obj:(WinMain)
Dec 11 2024
On Wednesday, 11 December 2024 at 11:22:09 UTC, bauss wrote:Whenever I try to use MessageBoxA then I get a linking error that the symbol cannot be found. I am importing core.sys.windows.windows. What else am I missing? The exact error: ``` lld-link: error: undefined symbol: MessageBoxAI have no idea whether it should be automatically linked with it, but it requires User32.lib pragma(lib, "user32"); should work, otherwise it must be provided via linker flags. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messageboxaError: linker exited with status 1 ```referenced by ...\source\client\source\main.d:24 ...\~master\build\application-debug-FMqG_QyKCCZMqpWApQaoww\....obj:(WinMain)
Dec 11 2024
On Wednesday, 11 December 2024 at 11:32:44 UTC, Ferhat Kurtulmuş wrote:On Wednesday, 11 December 2024 at 11:22:09 UTC, bauss wrote:pragma(lib, "user32") worked. Thank you.Whenever I try to use MessageBoxA then I get a linking error that the symbol cannot be found. I am importing core.sys.windows.windows. What else am I missing? The exact error: ``` lld-link: error: undefined symbol: MessageBoxAI have no idea whether it should be automatically linked with it, but it requires User32.lib pragma(lib, "user32"); should work, otherwise it must be provided via linker flags. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messageboxaError: linker exited with status 1 ```referenced by ...\source\client\source\main.d:24 ...\~master\build\application-debug-FMqG_QyKCCZMqpWApQaoww\....obj:(WinMain)
Dec 11 2024