`_w32_dll_instance` only used in `get_default_magic` In fact, for static libraries, `_w32_dll_instance` is not needed. `DllMain` is only used to initialize `_w32_dll_instance`. > `libmagic.lib(magic.obj) : error LNK2005: DllMain already defined in dllmain.obj` This causes naming conflicts when linking libmagic to a dynamic library: LPVOID lpvReserved _attribute_((_unused_))) * Placate GCC by offering a sacrificial previous prototype */īOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID) ĭllMain(HINSTANCE hinstDLL, DWORD fdwReason, But `libmagic` define the `DllMain` in `magic.c`: I want build `libmagic` as static library for Windows. Naming conflict when compiling libmagic as Windows static library There are no notes attached to this issue. gitlab-ci.yml which generated this scan-build report: On latest master, scan-build reports multiple logical errors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |