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

-no-entry-point inc conjunction with -no-crt and -build-mode:dll produces linker error for dllmain #4660

Open
SaculRennorb opened this issue Jan 5, 2025 · 0 comments

Comments

@SaculRennorb
Copy link

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Odin: dev-2024-12-nightly:cf53404
OS: Windows 10 Enterprise N (version: 20H2), build 19042.1466
CPU: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
RAM: 65470 MiB
Backend: LLVM 18.1.8

Expected Behavior

Compiling a empty dll without main and crt should just work.

Current Behavior

Compiling an empty file with -file -no-crt -no-entry-point -build-mode:dll produces

LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup

and fails to produce the dll.

Failure Information (for bugs)

Steps to Reproduce

  1. create an empty filetest.odin
  2. compile it with odin build test.odin -file -no-crt -no-entry-point -build-mode:dll
  3. liker error

Workaround

For Microsoft cl you can add -extra-linker-flags:/NOENTRY (which i expected to already be set according to the odin flags, but i appears not to be, which solved the issue.

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

No branches or pull requests

1 participant