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

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

Open
PerryWerneck opened this issue Nov 1, 2024 · 0 comments

Comments

@PerryWerneck
Copy link
Contributor

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

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