473,756 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unresolved external symbol ___security_coo kie

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_coo kie or

error LNK2001: unresolved external symbol ___security_coo kie

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.
Nov 16 '05 #1
6 26370
Hello Olivier,

Thanks for posting in the group.

When getting the errors:

error LNK2001: unresolved external symbol ___security_coo kie
error LNK2001: unresolved external symbol @__security_che ck_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_co okie" 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/de...us/vccore/html
/vclrfGSBufferSe curity.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" <ol************ **@logitech.com >
!Subject: unresolved external symbol ___security_coo kie
!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: <eZ************ *@TK2MSFTNGP12. phx.gbl>
!Newsgroups: microsoft.publi c.dotnet.langua ges.vc
!NNTP-Posting-Host: amreg.logitech. com 67.17.144.2
!Path:
cpmsftngxa07.ph x.gbl!cpmsftngx a10.phx.gbl!cpm sftngxa06.phx.g bl!TK2MSFTNGP08 .
phx.gbl!TK2MSFT NGP12.phx.gbl
!Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.langua ges.vc:28278
!X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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_coo kie or
!
!error LNK2001: unresolved external symbol ___security_coo kie
!
!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.
!
!
!

Nov 16 '05 #2
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]" <yh*****@online .microsoft.com> wrote in message
news:Oz******** ******@cpmsftng xa06.phx.gbl...
Hello Olivier,

Thanks for posting in the group.

When getting the errors:

error LNK2001: unresolved external symbol ___security_coo kie
error LNK2001: unresolved external symbol @__security_che ck_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_co okie" 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/de...us/vccore/html /vclrfGSBufferSe curity.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" <ol************ **@logitech.com >
!Subject: unresolved external symbol ___security_coo kie
!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: <eZ************ *@TK2MSFTNGP12. phx.gbl>
!Newsgroups: microsoft.publi c.dotnet.langua ges.vc
!NNTP-Posting-Host: amreg.logitech. com 67.17.144.2
!Path:
cpmsftngxa07.ph x.gbl!cpmsftngx a10.phx.gbl!cpm sftngxa06.phx.g bl!TK2MSFTNGP08 . phx.gbl!TK2MSFT NGP12.phx.gbl
!Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.langua ges.vc:28278
!X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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_coo kie or
!
!error LNK2001: unresolved external symbol ___security_coo kie
!
!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.
!
!
!

Nov 16 '05 #3
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

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

--------------------
!From: "Olivier Lechenne" <ol************ **@logitech.com >
!References: <eZ************ *@TK2MSFTNGP12. phx.gbl>
<Oz************ **@cpmsftngxa06 .phx.gbl>
!Subject: Re: unresolved external symbol ___security_coo kie
!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: <O7************ *@tk2msftngp13. phx.gbl>
!Newsgroups: microsoft.publi c.dotnet.langua ges.vc
!NNTP-Posting-Host: amreg.logitech. com 67.17.144.2
!Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vc:28408
!X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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]" <yh*****@online .microsoft.com> wrote in message
!news:Oz******* *******@cpmsftn gxa06.phx.gbl.. .
!> Hello Olivier,
!>
!> Thanks for posting in the group.
!>
!> When getting the errors:
!>
!> error LNK2001: unresolved external symbol ___security_coo kie
!> error LNK2001: unresolved external symbol @__security_che ck_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_co okie" 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/de...-us/vccore/htm
l
!> /vclrfGSBufferSe curity.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" <ol************ **@logitech.com >
!> !Subject: unresolved external symbol ___security_coo kie
!> !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: <eZ************ *@TK2MSFTNGP12. phx.gbl>
!> !Newsgroups: microsoft.publi c.dotnet.langua ges.vc
!> !NNTP-Posting-Host: amreg.logitech. com 67.17.144.2
!> !Path:
!>
!cpmsftngxa07.p hx.gbl!cpmsftng xa10.phx.gbl!cp msftngxa06.phx. gbl!TK2MSFTNGP0 8
Nov 16 '05 #4
How do I figure out how to link to the CRT? I thought that by having the /MT
option defined it would link with the corresponding CRT library
automatically.

Any help is welcome.

Olivier
"Brandon Bray [MSFT]" <br******@onlin e.microsoft.com > wrote in message
news:OP******** ******@TK2MSFTN GP09.phx.gbl...
Olivier Lechenne wrote:
The /GS flag was the culprit since I am building DLLs and SYS files.
Hi Olivier,
The problem was that the C run-time was not being linked into the DLLs,
and so the security routines were not found by the linker. Using /GS is
certainly worthwhile, so if you can figure out how to link in the right

part of the CRT, I'd recommend doing so.

Cheerio!

--
Brandon Bray Visual C++ Compiler
This posting is provided AS IS with no warranties, and confers no rights.

Nov 16 '05 #5
Olivier Lechenne wrote:
How do I figure out how to link to the CRT? I thought that by having the
/MT option defined it would link with the corresponding CRT library
automatically.


Are you using a different libcmt.lib to link with? The ones installed with
the Visual Studio are in the Vc7\lib directory. If the LIB path is
different, you could be linking with a different CRT.

Cheerio!

--
Brandon Bray Visual C++ Compiler
This posting is provided AS IS with no warranties, and confers no rights.
Nov 16 '05 #6
You're probably mixing debug and release. That's a no-no.

"Brandon Bray [MSFT]" <br******@onlin e.microsoft.com > wrote in message
news:Oa******** ******@TK2MSFTN GP12.phx.gbl...
Olivier Lechenne wrote:
How do I figure out how to link to the CRT? I thought that by having the
/MT option defined it would link with the corresponding CRT library
automatically.


Are you using a different libcmt.lib to link with? The ones installed with
the Visual Studio are in the Vc7\lib directory. If the LIB path is
different, you could be linking with a different CRT.

Cheerio!

--
Brandon Bray Visual C++ Compiler
This posting is provided AS IS with no warranties, and confers no rights.

Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
10083
by: Rodolphe | last post by:
Hello, I'm French so sorry for my approximate English. When I try to compile a project under Visual C++ 6.0, I've got the following errors : applicap.obj : error LNK2001: unresolved external symbol _IID_ISampleGrabber applicap.obj : error LNK2001: unresolved external symbol _CLSID_NullRenderer applicap.obj : error LNK2001: unresolved external symbol
0
2811
by: Ida | last post by:
Hi, I am trying to build an dll with Microsoft Visual C++ but during the linking phase I get linking errors. Script.obj : error LNK2019: unresolved external symbol __imp__PyString_AsString referenced in function "public: static struct _object * __cdecl SomeFunctionName Script.obj : error LNK2019: unresolved external symbol __imp__PyObject_Repr referenced in function "public: static struct _object * __cdecl
5
17719
by: cschettle | last post by:
I think you need to link with msvcrt.lib ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
2
5331
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
2
7151
by: Maydogg6 | last post by:
I need a hand with some stubborn link errors. I'm trying to recreate and old program from 6.0 into .NET, but for some reason when I try to compile I'm getting linking errors for all my function calls that deal with sockets. I've included <winsock2.h> in stdafx.h and I linked to ws2_32.lib by going to project properties->linker->general->additional library directories and typing in ws2_32.lib. Am I missing some include files or have the...
6
121915
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could not help me. Does any body know what is the problem?. Thanks. OtherFunctions.obj : error LNK2001: unresolved external symbol "int
5
4795
by: bonnielym84 | last post by:
Im new here..didnt noe whether is this the rite way to post my problem..Really need help here..i've been stucked in this error from last wk..My problem is like this..Im using VC++ 6.0 to compile my C codes so that i could generate a dll file out of it and used in my C# program.. When I compile, got no error and no warning. But when i build it, i have these errors.. *beginning* sendrcv.obj : error LNK2001: unresolved external symbol "int...
0
2708
by: Ryan Gaffuri | last post by:
hlink72@hotmail.com (Eric) wrote in message news:<ab8d8b14.0308220550.54fb5f22@posting.google.com>... LNK1120 is a standard C++ error. you using Visual C++? Means your references a class that doesnt exist or something similiar to that. explanation on microsoft.com its not an oracle specific problem.
2
2717
by: =?Utf-8?B?YmFzaA==?= | last post by:
Hello, I am compiling a CPP code using Visual studion .net 2003. I get the following error, despite having windldap.h and wldap32.dll in my include and lib paths. Here is the error. uuid.lib rpcrt4.lib ole32.lib oleaut32.lib uuid.lib Creating library libsq00.lib and object libsq00.exp libq00.lib(ootb.obj) : error LNK2019: unresolved external symbol _ldap_unbind@4
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.