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

Unresolved symbol __DllMainCRTStartup@12 when building a DLL targeting i386-windows-msvc #11926

Open
Tracked by #537
alexrp opened this issue Jun 24, 2022 · 0 comments
Open
Tracked by #537
Labels
arch-x86 bug Observed behavior contradicts documented or intended behavior os-windows
Milestone

Comments

@alexrp
Copy link
Sponsor Contributor

alexrp commented Jun 24, 2022

Zig Version

0.9.1

Steps to Reproduce

#include <windows.h>

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    return TRUE;
}

Build with zig cc -shared -target i386-windows-msvc test.c -o a.dll.

Expected Behavior

It should link successfully.

Actual Behavior

lld-link: error: <root>: undefined symbol: __DllMainCRTStartup@12

Notably, x86_64-windows-msvc works fine, as do i386-windows-gnu/x86_64-windows-gnu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x86 bug Observed behavior contradicts documented or intended behavior os-windows
Projects
None yet
Development

No branches or pull requests

2 participants