Reputation: 912
I use Qt 5.4 & MinGW. I read that one should link uuid library to avoid this error. In my .pro file I added
LIBS += libuuid libole32 liboleaut32
However, I get undefined reference error anyway even if I have this line
D:\Dev\HinstStart\FileListData.cpp:74: ошибка: undefined reference to `IID_IImageList'
P.S: If I add some non-existing lib like
LIBS += libuuid libole32 liboleaut32 liblol
then I get "cannot find -llol" error. This is how I know that my LIBS statement is not being ignored
Upvotes: 2
Views: 1515
Reputation: 11
The solution, when using MinGW-w64, is to include the header #include <initguid.h>
, before including headers that contain COM identifiers such as commoncontrols.h
, mmdeviceapi.h
, endpointvolume.h
.
#include <initguid.h>
#include <commoncontrols.h>
#include <mmdeviceapi.h>
#include <endpointvolume.h>
The solution was found at Undefined reference to CLSID_MMDeviceEnumerator and IID_IMMDeviceEnumerator
Upvotes: 1