error LNK2001: unresolved external symbol for _CLSID_CCertRequest & _IID_ICertRequest2
I am trying to create certificate using PKCS # 10 certificate format. Certificate request goes to CA and CA will return back the certificate to device application. I have got code from net, which i have attached. But i was unable to compile that code and it displays following error
error LNK2001: unresolved external symbol _CLSID_CCertRequest
error LNK2001: unresolved external symbol _IID_ICertRequest2
Anybody has idea to resolve this error.
Sam HobbsPosted May 1, 2011, 2:31 PM
Have you looked at Compile and Link Considerations? If not then that is likely to help. If you have not added Advapi32.lib to the list of libraries for the project then do that.
Gaurav SharmaPosted May 1, 2011, 5:27 AM
http://msdn.microsoft.com/en-us/library/ms867026.aspx
You will code from mention wording from site "Download the associated CertificateEnrollmentSamples.exe."
And try to compile "PKCS10AltSubName.cpp" code.I thought crypt32lib was missing but i have found it in the SDK folder. So unable to know the real cause of issue.
Sam HobbsPosted Apr 29, 2011, 1:01 PM
Is the code C++? I assume it is. Those error messages are from the link editor which is executed after the C++ compiler. There is probably an #include or possibly an #import missing, but this is an area with a lot of confusing details. Your best chance of sovling the problem is to read what the web site says where you got the code from. There is likely something you are overlooking.