I have this headers in my class
#include <windows.h>
#include <mmreg.h>
#include <msacm.h>
#include <wmsdk.h>
#pragma comment(lib, "msacm32.lib")
#pragma comment(lib, "wmvcore.lib")
#pragma comment(lib, "winmm.lib")
#pragma intrinsic(memset,memcpy,memcmp)
When i try to use the function CreateStreamOnHGlobal(mp3HGlobal, FALSE, &mp3Stream); i get this error:
playlist.obj:-1: error: LNK2019: unresolved external symbol __imp__CreateStreamOnHGlobal@12 referenced in function "public: int __thiscall Playlist::getLengthInSeconds(class QString)" (?getLengthInSeconds@Playlist@@QAEHVQString@@@Z)
I’ve tried to add the msacm32.lib but I found that exist under the name MSAcm32.lib and Qt doesn’t recognize it; also with winmm.lib, who has the name WinMM.lib. I don’t know what to add, what to do so that my program to work. What can i do?
If by
you mean that the linker error is not resolved, the following may help.
According to http://msdn.microsoft.com/en-us/library/windows/desktop/aa378980(v=vs.85).aspx you should also be linking to
Ole32.libforCreateStreamOnHGlobal. If after adding ole32.lib other linker errors occur, a quick google or MSDN search will show you which lib files are missing.Also, FYI windows is not case-sensitive.