RE: Getting LINK2001 errors with 'Adduser.c'

From: Kevin Saye (KevinSaye_at_discussions.microsoft.com)
Date: 09/07/05


Date: Wed, 7 Sep 2005 06:41:03 -0700

Thanks, that did it!

"wolf777" wrote:

> You have to go to your project settings and add a linker dependency -
> crypt32.lib is required for Certificate Store functions. Don't forget to do
> that for both Debug and Release configuration.
>
>
> "Kevin Saye" wrote:
>
> > I am trying to compile the example from
> > 'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/adding_users_to_an_encrypted_file.asp' and I am getting the error:
> >
> > Deleting intermediate files and output files for project 'Adduser - Win32
> > Debug'.
> > --------------------Configuration: Adduser - Win32 Debug--------------------
> > Compiling...
> > Adduser.c
> > Linking...
> > Adduser.obj : error LNK2001: unresolved external symbol
> > __imp__CertCloseStore@8
> > Adduser.obj : error LNK2001: unresolved external symbol
> > __imp__CertFreeCertificateContext@4
> > Adduser.obj : error LNK2001: unresolved external symbol
> > __imp__AddUsersToEncryptedFile@8
> > Adduser.obj : error LNK2001: unresolved external symbol
> > __imp__CertFindCertificateInStore@24
> > Adduser.obj : error LNK2001: unresolved external symbol
> > __imp__CertOpenSystemStoreW@8
> > Adduser.obj : error LNK2001: unresolved external symbol
> > __imp__LookupAccountNameW@28
> > Debug/Adduser.exe : fatal error LNK1120: 6 unresolved externals
> > Error executing link.exe.
> >
> > Adduser.exe - 7 error(s), 0 warning(s)
> >
> > I have installed the "Windows Server 2003 SP1 SDK" and I have modified the
> > (lib and include) directories in VC++ 6.0 to include "c:\Program
> > Files\Microsoft Platform SDK\Lib" and "c:\Program Files\Microsoft Platform
> > SDK\Include" . I can compile the file, just not link it. Any hints out
> > there?
> >
> > Kevin



Relevant Pages

  • Re: Right Click context menu sometimes disables "Go To Definition" using VSl.NET 2005
    ... hover over the _DEBUG, there is no value shown and the AssertValid ... Also the the contained code for AssertValid() ... doesn't happen on a simple change of configuration. ... code in the code editor. ...
    (microsoft.public.vc.language)
  • Re: C++ debug/release builds and project references
    ... Is your class library in configuration "Release"? ... How do you add reference in the Winform project? ... suspect if you add the ManagedClassLib.dll in the debug folder. ... Creating command line "cl.exe ...
    (microsoft.public.dotnet.languages.vc)
  • Re: MFC Application has encountered a problem and needs to close. HELP
    ... the above error message offering me an option to send a message to Microsoft. ... Whenever I run the program in debug configuration it runs OK. ... This has absolutely nothing to do with "MFC exception handling", ...
    (microsoft.public.vc.mfc)
  • Error while trying to debug
    ... When I was trying to open one of my ASP projects somewhere else, I got the following error message: ... Check to see that the project has a valid Web.config file, that the Web.config file sets "debug" to true, and that the debug verb is associated with .aspx. ... An error occurred during the processing of a configuration file required to service this request. ... Source Error: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Can I change my code depending on the build type?
    ... "Release" configuration for one of projects in the solution - the only option ... is debug. ... if I set compilation debug="false" in web.config. ... the buffer is full or has lived a certain time, ...
    (microsoft.public.dotnet.framework.aspnet)