Skip to content

multiple definition of `_com_issue_error(long)' when linking all sources statically #36

@PerryWerneck

Description

@PerryWerneck

When I try to link all wmi sources in the same static library I go the error below, comenting the _com_issue_error seens to fix the problem.

FAILED: libvmdetect-1.dll /usr/bin/x86_64-w64-mingw32-g++ -o libvmdetect-1.dll libvmdetect-1.dll.p/src_libvmdetect_common.cc.obj libvmdetect-1.dll.p/src_libvmdetect_os_windows_virtualmachine.cc.obj libvmdetect-1.dll.p/wmi_diaa_sami_comsupp_diaa_sami_comsupp.cpp.obj libvmdetect-1.dll.p/wmi_src_wmi.cpp.obj libvmdetect-1.dll.p/wmi_src_wmiresult.cpp.obj -Wl,--allow-shlib-undefined -shared -Wl,--start-group -Wl,--out-implib=libvmdetect.dll.a -lwbemuuid -loleaut32 -lole32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group /usr/lib64/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld: libvmdetect-1.dll.p/wmi_src_wmi.cpp.obj: in function _com_issue_error(long)':
/usr/x86_64-w64-mingw32/sys-root/mingw/include/comdef.h:181: multiple definition of _com_issue_error(long)'; libvmdetect-1.dll.p/wmi_diaa_sami_comsupp_diaa_sami_comsupp.cpp.obj:/home/perry/project/udjat/vmdetect/.build/../wmi/diaa_sami_comsupp/diaa_sami_comsupp.cpp:8: first defined here collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions