login about faq

I am building the SFTP application and got the following err:

Error 2 error LNK2001: unresolved external symbol 
    ___report_rangecheckfailure E:/MyProjects/something/blahblah/blahblah/ChilkatRel.lib(ZeeDeflateState.obj)

The project is just the sample code to write text file over sftp.

asked Sep 20 '12 at 11:16

chilkat's gravatar image

chilkat ♦♦

See this MSDN web page:

Also see this:

The Chilkat C++ libs for Visual Studio 11 are compiled with the default settings, which includes the on-by-default /GS compiler switch, which provides protection against some memory safety bugs such as buffer overflows. The ___report_rangecheckfailure is not a Chilkat function, but is part of the Microsoft Platform SDK. It may be that compiling your app with the /GS compiler switch on will solve the problem.


answered Sep 20 '12 at 11:26

chilkat's gravatar image

chilkat ♦♦

Please try these new builds:
(32-bit) http://www.chilkatsoft.com/preRelease/chilkat-9.3.2-x86-vc11.zip
(64-bit) http://www.chilkatsoft.com/preRelease/chilkat-9.3.2-x86_64-vc11.zip

They are built without the /GS option and therefore the extra code (rangecheckfailure) added by the MSVC++ compiler shouldn't be present.


answered Oct 01 '12 at 17:08

chilkat's gravatar image

chilkat ♦♦

This is not specific to Chilkat, but is how I resolved this in another context. Perhaps it will be helpful to you, also.

In the Solution Explorer, look at the project that you're linking (not the library) and see if the entry is marked "(Visual Studio 2010)". If so, they you will have to choose between updating that project to Visual Studio 2012 (or later) or turning off compiler option /GS (Buffer Security Check) in that project and all of the libraries from which it pulls in code.

Normally in Visual Studio 2012, the linker uses the "Microsoft Visual Studio 11.0" C libraries. However, if your project is identified as "(Visual Studio 2010)", the linker uses the "Microsoft Visual Studio 10.0" instead.

In Visual Studio 2012 and later, the /GS option generates calls to __report_rangecheckfailure. (See http://blogs.msdn.com/b/sdl/archive/2012/01/26/enhancements-to-gs-in-visual-studio-11.aspx for a detailed description.) In the "Microsoft Visual Studio 11.0" libraries, __report_rangecheckfailure, is in msvcrt[d].lib, but it does not appear at all in the "Microsoft Visual Studio 10.0" libraries. Hence, a "(Visual Studio 2010)" project that uses code built with /GS under Visual Studio 2012 will get an unresolved external reference to __report_rangecheckfailure.

So, your choices are to upgrade your project to Visual Studio 2012 (from the main menu Project | Upgrade VC++ projects…) or to forgo compiler option /GS (in the project's Property Pages, select Configuration Properties | C/C++ | Code Generation, and set Buffer Security Check to No (/GS-).)


answered Jul 18 '13 at 19:44

Dan%20Konigsbach's gravatar image

Dan Konigsbach

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 20 '12 at 11:16

Seen: 9,182 times

Last updated: Jul 18 '13 at 19:44

Related questions

powered by OSQA