I am using MS Visual C++ to do a "quick" little project to create a tiny dll that I need. I hope this is the correct forum for this question.
I have a fairly simple project that compiles with no errors but, when I try to build it, I am getting some linking errors. The errors are cause by my use of msi.h, msiquery.h, and ShFolder.h.
If I understand linking correctly, the linker is trying to match the declaration of certain functions that are declared in the header files I mentioned above with their implementation in some other file. So, it seems that I should find the .lib files that implement the functions I am using, and make sure the compiler can find those files, right?
I am using one function from msiquery.h, and that is MsiSetTargetPath. I am using one function from ShFolder.h, and that is SHGetFolderPath. My includes look like this:
#include "msi.h" //not sure this is necesarry
#include "MsiQuery.h"
#include "ShFolder.h"
The linker errors I am getting are as follows:
FindPublicDocsDir.obj : error LNK2001: unresolved external symbol _MsiSetTargetPathA@12
FindPublicDocsDir.obj : error LNK2001: unresolved external symbol __imp__SHGetFolderPathA@20
I cannot find a msquery.lib or shfolder.lib on my machine. I have found a shfolder.dll file but, I am not sure if I can reference that.
Can someone give me some advice on what to do?
Thanks very much.