How to create Notepad ++ with Visual C ++ 2010 Express?

Installed Windows SDK. I have already successfully created N ++ with Visual C ++ 2008 Express. But now since 2010 I have sprintf_s a lot of sprintf_s error messages:

 1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(676): error C2039: 'sprintf_s' : is not a member of '`global namespace'' 1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(676): error C3861: 'sprintf_s': identifier not found 

Please, help.

+7
notepad ++ visual-studio-2010 visual-c ++ - 2010-express
source share
3 answers

There is a property sheet included in the project with the name no_ms_shit.props (after conversion). In this sheet, what MS has been trying to do over the past 5 years has been full of hatred.

They went too much on themselves, disconnecting everything, even disconnecting from sprintf_s (). What is the source of your error, the stdio.h header skips the declaration, but the line header uses it. Not sure if the Express version supports editing project property sheets, but a step in the retail version:

  • View + Property Manager
  • Open one of the nodes and find "no ms shit"
  • Right click on it, Properties
  • C / C ++, preprocessor, preprocessor definitions
  • Change __STDC_WANT_SECURELIB__=0 to 1
  • Add _CRT_SECURE_NO_WARNINGS to these definitions

Now the project is compiling. I get a build error for copying files, this is an event after the build. Start another question if you cannot figure out how to fix it.

+20
source share

It’s strange. I have Visual Studio 2010 Ultimate, and it does not even allow me to access the menu item View-> Property Pages. It is disabled for me.

But I just went to the no_ms_shit.props file and edited it only in Notepad ++ :). Then we went to Project-> Properties-> Configuration Properties-> General and selected "No" for handling warnings as "Errors" and added _CRT_SECURE_NO_WARNINGS in the preprocessor definitions.

Don Ho has to go with the flow than damn ms shit when he develops on Windows and Visual Studio.


This worked for me when using Visual Studio 2012 Professional :
  • You need to edit no_ms_shit.vsprops (*. Vsprops, not just * .props!):

    Replace __STDC_WANT_SECURE_LIB__=0 with __STDC_WANT_SECURE_LIB__=1

  • Add _CRT_SECURE_NO_WARNINGS to the preprocessor definitions.

+4
source share

A closer look at the source would show that most library calls that cause endless noise if you do not use this property page exit the SciLexer.dll project. Scintilla is a cross platform, so it doesn’t need the entire Windows hard drive. As you already mentioned, Microsoft went overboard with the replacement of the standard string library as legitimate as their attempt to avoid buffer overflows.

So, you can direct this criticism to Neil Hodgson (the main developer of Scintilla), and not don Ho.

CChris

+2
source share

All Articles