Skip to content

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

@PolarGoose

Description

@PolarGoose

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

Metadata

Metadata

Assignees

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions