-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC linking issue with std.zlib #306
Comments
How did you compile it? I put the code into file |
The same way... Maybe it depends on the VC version? |
Seems to depend on the VC version. I use VisualStudio 2012. I have a report that the link error occurs with the linker from VisualStudio 2008. |
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-).) |
@redstar I guess this can be closed then. |
Works in version 0.15.0. |
Output:
(Using LDC.zip Kai posted here)
The text was updated successfully, but these errors were encountered: