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

[libmagic] x64-windows-static: linking failure "DllMain already defined" #44559

Open
PolarGoose opened this issue Mar 22, 2025 · 0 comments · May be fixed by #44566
Open

[libmagic] x64-windows-static: linking failure "DllMain already defined" #44559

PolarGoose opened this issue Mar 22, 2025 · 0 comments · May be fixed by #44566
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@PolarGoose
Copy link

PolarGoose commented Mar 22, 2025

Operating system

Windows

Compiler

MSVC

Steps to reproduce the behavior

  • Add libmagic to your list of dependencies
  • Build the project as x64-windows-static-rel or x64-windows-static-dbg
  • The magic.lib that vcpkg will use contains DllMain because the variable BUILD_AS_WINDOWS_STATIC_LIBARAY is not set during the build of the libmagic package. source code of magic.c

Failure logs

Error	LNK2005	DllMain already defined in MyProjectName.obj	MyProjectName C:\MyProject\magic.lib(magic.obj)	1

Additional context

No response

@PolarGoose PolarGoose added the category:port-bug The issue is with a library, which is something the port should already support label Mar 22, 2025
@PolarGoose PolarGoose linked a pull request Mar 23, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants