Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2003

Tip: Looking for answers? Try searching our database.

unresolved external symbol ___security_cookie

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Olivier Lechenne - 16 Sep 2003 18:56 GMT
I am converting some projects from VS 6.0 to VS .NET 2003 and I get a linker
error
error LNK2001: unresolved external symbol ___security_cookie or

error LNK2001: unresolved external symbol ___security_cookie

Does anybody knows where does this symbol comes from? Is it because I am
using a wrong library or have some bad compiler/linker options?

Thanks for any help

Olivier Lechenne

Logitech Inc.
Yan-Hong Huang[MSFT] - 17 Sep 2003 04:41 GMT
Hello Olivier,

Thanks for posting in the group.

When getting the errors:

error LNK2001: unresolved external symbol ___security_cookie
error LNK2001: unresolved external symbol @__security_check_cookie@4

in Visual Studio .NET, it is likely that another library is being pulled
into the project.  Add the /verbose:lib switch to the Linker command line
and do a rebuild all.  This will output all of the libraries that are being
searched.  If you see any libs that live in folders that are not part of
the Microsoft Visual Studio .NET install folder and you are not sure why
they are there, then that is probably the cause of this problem.

Go to Tools | Options | Projects | VC++ Directories and in the Include
Files and Library Files directories check for additional paths that should
not be there.

Also, the "unresolved external symbol ____security_cookie" problem has also
been seen when building DLLs in Visual Studio .NET with the /GS ("buffer
security check") flag.  This problem is lightly discussed in the MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html
/vclrfGSBufferSecurity.asp

The workarounds given are:

*  Not use arrays in any functions that call (or end up calling) CRT_INIT,
for example, use _alloca instead.
*  Let the CRT initialize normally. Don't specify your own entry point, use
DllMain instead (and don't call CRT_INIT).

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
!From: "Olivier Lechenne" <olivier_lechenne@logitech.com>
!Subject: unresolved external symbol ___security_cookie
!Date: Tue, 16 Sep 2003 10:56:04 -0700
!Lines: 20
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <eZo#pvHfDHA.892@TK2MSFTNGP12.phx.gbl>
!Newsgroups: microsoft.public.dotnet.languages.vc
!NNTP-Posting-Host: amreg.logitech.com 67.17.144.2
!Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP12.phx.gbl
!Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.vc:28278
!X-Tomcat-NG: microsoft.public.dotnet.languages.vc
!
!I am converting some projects from VS 6.0 to VS .NET 2003 and I get a
linker
!error
!error LNK2001: unresolved external symbol ___security_cookie or
!
!error LNK2001: unresolved external symbol ___security_cookie
!
!Does anybody knows where does this symbol comes from? Is it because I am
!using a wrong library or have some bad compiler/linker options?
!
!
!
!Thanks for any help
!
!
!
!Olivier Lechenne
!
!Logitech Inc.
!
!
!
Olivier Lechenne - 17 Sep 2003 22:22 GMT
Thanks for your help.
The /GS flag was the culprit since I am building DLLs and SYS files.

Olivier Lechenne
Logitech Inc.
> Hello Olivier,
>
[quoted text clipped - 19 lines]
> been seen when building DLLs in Visual Studio .NET with the /GS ("buffer
> security check") flag.  This problem is lightly discussed in the MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html
> /vclrfGSBufferSecurity.asp
>
[quoted text clipped - 27 lines]
> !NNTP-Posting-Host: amreg.logitech.com 67.17.144.2
> !Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
> phx.gbl!TK2MSFTNGP12.phx.gbl
> !Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.vc:28278
[quoted text clipped - 22 lines]
> !
> !
Yan-Hong Huang[MSFT] - 18 Sep 2003 09:27 GMT
Hi Olivier,

I am glad to hear that the problem is resolved.

Thanks for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
!From: "Olivier Lechenne" <olivier_lechenne@logitech.com>
!References: <eZo#pvHfDHA.892@TK2MSFTNGP12.phx.gbl>
<OzQxM2MfDHA.2384@cpmsftngxa06.phx.gbl>
!Subject: Re: unresolved external symbol ___security_cookie
!Date: Wed, 17 Sep 2003 14:22:39 -0700
!Lines: 99
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <O7hiUHWfDHA.908@tk2msftngp13.phx.gbl>
!Newsgroups: microsoft.public.dotnet.languages.vc
!NNTP-Posting-Host: amreg.logitech.com 67.17.144.2
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:28408
!X-Tomcat-NG: microsoft.public.dotnet.languages.vc
!
!Thanks for your help.
!The /GS flag was the culprit since I am building DLLs and SYS files.
!
!Olivier Lechenne
!Logitech Inc.
!"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
!news:OzQxM2MfDHA.2384@cpmsftngxa06.phx.gbl...
!> Hello Olivier,
!>
!> Thanks for posting in the group.
!>
!> When getting the errors:
!>
!> error LNK2001: unresolved external symbol ___security_cookie
!> error LNK2001: unresolved external symbol @__security_check_cookie@4
!>
!> in Visual Studio .NET, it is likely that another library is being pulled
!> into the project.  Add the /verbose:lib switch to the Linker command line
!> and do a rebuild all.  This will output all of the libraries that are
!being
!> searched.  If you see any libs that live in folders that are not part of
!> the Microsoft Visual Studio .NET install folder and you are not sure why
!> they are there, then that is probably the cause of this problem.
!>
!> Go to Tools | Options | Projects | VC++ Directories and in the Include
!> Files and Library Files directories check for additional paths that
should
!> not be there.
!>
!> Also, the "unresolved external symbol ____security_cookie" problem has
!also
!> been seen when building DLLs in Visual Studio .NET with the /GS ("buffer
!> security check") flag.  This problem is lightly discussed in the MSDN:
!>
!>
!http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/htm
l
!> /vclrfGSBufferSecurity.asp
!>
!> The workarounds given are:
!>
!> *  Not use arrays in any functions that call (or end up calling)
CRT_INIT,
!> for example, use _alloca instead.
!> *  Let the CRT initialize normally. Don't specify your own entry point,
!use
!> DllMain instead (and don't call CRT_INIT).
!>
!> Does that answer your question?
!>
!> Best regards,
!> Yanhong Huang
!> Microsoft Online Partner Support
!>
!> Get Secure! - www.microsoft.com/security
!> This posting is provided "AS IS" with no warranties, and confers no
!rights.
!>
!> --------------------
!> !From: "Olivier Lechenne" <olivier_lechenne@logitech.com>
!> !Subject: unresolved external symbol ___security_cookie
!> !Date: Tue, 16 Sep 2003 10:56:04 -0700
!> !Lines: 20
!> !X-Priority: 3
!> !X-MSMail-Priority: Normal
!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!> !Message-ID: <eZo#pvHfDHA.892@TK2MSFTNGP12.phx.gbl>
!> !Newsgroups: microsoft.public.dotnet.languages.vc
!> !NNTP-Posting-Host: amreg.logitech.com 67.17.144.2
!> !Path:
!>
!cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.